public static Vector2 Snap(this Vector2 v, Vector2 snap) { return(new Vector2(MathfExtensions.SnapToInterval(v.x, snap.x), MathfExtensions.SnapToInterval(v.y, snap.y))); }
public static Vector3 Snap(this Vector3 v, Vector3 snap) { return(new Vector3(MathfExtensions.SnapToInterval(v.x, snap.x), MathfExtensions.SnapToInterval(v.y, snap.y), MathfExtensions.SnapToInterval(v.z, snap.z))); }