Snap to grid by rounding instead of casting