Round
Rounds a number to the nearest whole number.
Node id math/round
The Round node outputs the whole number nearest to value: 2.4 gives 2,
and 2.6 gives 3.
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| value | number | 0 |
Outputs
| Name | Type | Notes |
|---|---|---|
| result | number |
Behaviour
- Halves round up. A number exactly halfway rounds towards larger
numbers, as in JavaScript's
Math.round: 2.5 gives 3, but -2.5 gives -2. - To other steps. To round to a multiple of 10, divide by 10, round, then multiply by 10.