예제 #1
0
 public static Vector2 Snap(this Vector2 v, Vector2 snap)
 {
     return(new Vector2(MathfExtensions.SnapToInterval(v.x, snap.x), MathfExtensions.SnapToInterval(v.y, snap.y)));
 }
예제 #2
0
 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)));
 }