Generates a step-length series of values between start and end (inclusive). Each value will be equally spaced.
step
start
end
for (const v of linearSpace(1, 5, 6)) { // Yields: [ 1, 1.8, 2.6, 3.4, 4.2, 5 ]} Copy
for (const v of linearSpace(1, 5, 6)) { // Yields: [ 1, 1.8, 2.6, 3.4, 4.2, 5 ]}
Numbers can be produced from large to small as well
const values = [...linearSpace(10, 5, 3)];// Yields: [10, 7.5, 5] Copy
const values = [...linearSpace(10, 5, 3)];// Yields: [10, 7.5, 5]
Start number (inclusive)
End number (inclusive)
How many steps to make from start -> end
Optional
Number of decimal points to round to
Generates a
step
-length series of values betweenstart
andend
(inclusive). Each value will be equally spaced.Numbers can be produced from large to small as well