minmax
Call Signature
Section titled “Call Signature”minmax(
values):MinMaxResult
Defined in: packages/core/src/number/minmax.ts:19
Calculates the minimum and maximum values from a list of numbers.
This function iterates through the provided numbers to find the smallest and largest values.
Its equivalent to calling Math.min and Math.max, but does the iteration
only once.
Parameters
Section titled “Parameters”values
Section titled “values”readonly number[]
The values to calculate the min and max of, as an array or as separate arguments.
Returns
Section titled “Returns”An object containing the min and max values, or min = Infinity and
max = -Infinity if no values are provided.
Call Signature
Section titled “Call Signature”minmax(…
values):MinMaxResult
Defined in: packages/core/src/number/minmax.ts:20
Calculates the minimum and maximum values from a list of numbers.
This function iterates through the provided numbers to find the smallest and largest values.
Its equivalent to calling Math.min and Math.max, but does the iteration
only once.
Parameters
Section titled “Parameters”values
Section titled “values”…number[]
The values to calculate the min and max of, as an array or as separate arguments.
Returns
Section titled “Returns”An object containing the min and max values, or min = Infinity and
max = -Infinity if no values are provided.