@extra-array/linspace
v2.3.18
Published
Returns evenly spaced values within given interval.
Downloads
178
Maintainers
Keywords
Readme
Returns evenly spaced values within given interval.
This is part of package extra-array.
array.linspace(v, V, [n]);
// v: start of interval
// V: end of interval
// n: no. of values in between (100)
const array = require('extra-array');
array.linspace(0, 1, 3);
// [0, 0.5, 1]
array.linspace(0, -1, 5);
// [0, -0.25, -0.5, -0.75, -1]
array.linspace(0, 1);
// [0, ..., 1] (100 values)