Snaps a value to the nearest grid-aligned value.
Input vlaue
Grid size
Offset to apply after the snap
Snaps a value to the nearest grid-aligned value.