number/normalizeMinMax

Evaluates minimum and maximum values and returns an object with min and max properties are guaranteed.

Source:

Methods

(static) normalizeMinMax(min, max) → {Object}

Source:
Example
import { normalizeMinMax } from '@untemps/utils/number/normalizeMinMax'

const min = 100
const max = 0
normalizeMinMax(min, max) // { min: 0, max: 100 }
Parameters:
Name Type Description
min number

The minimum value to evaluate.

max number

The maximum value to evaluate.

Returns:

An object where min and max properties are guaranteed.

Type
Object