Snap a value to nearest grid slice, using floor.
Example: if you have an interval gap of 5 and a position of 12... you will snap to 10. As will 14 snap to 10... but 16 will snap to 15.
5
12
10
14
16
15
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 floor.
Example: if you have an interval gap of
5and a position of12... you will snap to10. As will14snap to10... but16will snap to15.