Round to a step
Round a number to the nearest step, e.g. prices to 0.05 or 0.99 endings, times to 15 minutes, quantities to a pack size.
Command in the Number toolkit · id ooa.number/round_to_step · 3 inputs (1 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Value | Number | Yes | Number to round. | |
| Step | Number | No | 0.05 | The step, e.g. 0.05, 0.5, 10 or 12 (a pack of twelve). |
| Direction | String | No | nearest | To the nearest step (halves go up), always up, or always down. |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | Number | The rounded number. |