Snap a value to nearest grid slice, using ceil.
Example: if you have an interval gap of 5 and a position of 12... you will snap to 15. As will 14 snap to 15... but 16 will snap to 20.
5
12
15
14
16
20
The value to snap.
The interval gap of the grid.
Optional
Optional starting offset for gap. Default 0.
If true it will divide the snapped value by the gap before returning. Default false.
true
Snap a value to nearest grid slice, using ceil.
Example: if you have an interval gap of
5and a position of12... you will snap to15. As will14snap to15... but16will snap to20.