Range
An array of evenly spaced numbers.
Node id array/range
The Range node outputs count numbers, starting at start and going up by
step: count 4, start 0 and step 1 give 0, 1, 2, 3; count 3, start 10
and step -2.5 give 10, 7.5, 5.
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| count | number | 0 | |
| start | number | 0 | |
| step | number | 1 |
Outputs
| Name | Type | Notes |
|---|---|---|
| array | Array<number> |
Behaviour
- Defaults.
countdefaults to 0 (an empty array),startto 0 andstepto 1. - Counting loops. Range is the usual start for doing something a number of times: give it to Map, which calls its function once per number.
- Precision. Each number is
start + index × step, so fractional steps can give values like 0.30000000000000004 instead of 0.3.
Errors
countmust be a whole number, 0 or more.
Related nodes
- Map: calls a function for each number.
- Make Array: an array of chosen values.
- Orthogonal Grid: evenly spaced points in two dimensions.