extent
extent(
x):number[]
Defined in: src/extent.js:15
This computes the minimum & maximum number in an array.
This runs in O(n), linear time, with respect to the length of the array.
If any value is NaN, both bounds are NaN, wherever that value appears.
Parameters
Section titled “Parameters”number[]
sample of one or more data points
Returns
Section titled “Returns”number[]
minimum & maximum value
Throws
Section titled “Throws”if the length of x is less than one
Example
Section titled “Example”extent([1, 2, 3, 4]);// => [1, 4]