Snap a value to a pixel depending on viewport size and zoom level. If viewport size is divisible by 2, the zoomed value will be snapped to integers. Otherwise the zoomed value will be snapped to .5 values instead.
The value to snap.
The viewport size.
The zoom level of the camera.
The adjusted value.
Snap a value to a pixel depending on viewport size and zoom level. If viewport size is divisible by 2, the zoomed value will be snapped to integers. Otherwise the zoomed value will be snapped to .5 values instead.