예제 #1
0
 public static Vector3i Scale(Vector3i a, Vector3i b)
 {
     return new Vector3i(a.X * b.X, a.Y * b.Y, a.Z * b.Z);
 }
예제 #2
0
 public Vector3i(Vector3i a)
 {
     X = a.X;
     Y = a.Y;
     Z = a.Z;
 }
예제 #3
0
 public static int Dot(Vector3i a, Vector3i b)
 {
     return a.X * b.X + a.Y * b.Y + a.Z * b.Z;
 }
예제 #4
0
 public static Vector3i Min(Vector3i lhs, Vector3i rhs)
 {
     return new Vector3i(Mathf.Min(lhs.X, rhs.X), Mathf.Min(lhs.Y, rhs.Y), Mathf.Min(lhs.Z, rhs.Z));
 }
예제 #5
0
 public static float Distance(Vector3i a, Vector3i b)
 {
     return Mathf.Sqrt(DistanceSquared(a, b));
 }
예제 #6
0
 public static int DistanceSquared(Vector3i a, Vector3i b)
 {
     int dx = b.X - a.X;
     int dy = b.Y - a.Y;
     int dz = b.Z - a.Z;
     return dx * dx + dy * dy + dz * dz;
 }
예제 #7
0
 public Vector3i(Vector3i a)
 {
     X = a.X;
     Y = a.Y;
     Z = a.Z;
 }
예제 #8
0
 public static Vector3i Clamp(Vector3i value, Vector3i min, Vector3i max)
 {
     return new Vector3i(Mathf.Clamp(value.X, min.X, max.X), Mathf.Clamp(value.Y, min.Y, max.Y), Mathf.Clamp(value.Z, min.Z, max.Z));
 }
예제 #9
0
 public static Vector3i Clamp(Vector3i value, Vector3i min, Vector3i max)
 {
     return(new Vector3i(Mathf.Clamp(value.X, min.X, max.X), Mathf.Clamp(value.Y, min.Y, max.Y), Mathf.Clamp(value.Z, min.Z, max.Z)));
 }
예제 #10
0
 public static Vector3i Max(Vector3i lhs, Vector3i rhs)
 {
     return(new Vector3i(Mathf.Max(lhs.X, rhs.X), Mathf.Max(lhs.Y, rhs.Y), Mathf.Max(lhs.Z, rhs.Z)));
 }
예제 #11
0
 public static float Distance(Vector3i a, Vector3i b)
 {
     return(Mathf.Sqrt(DistanceSquared(a, b)));
 }
예제 #12
0
 public static Vector3i Scale(Vector3i a, Vector3i b)
 {
     return(new Vector3i(a.X * b.X, a.Y * b.Y, a.Z * b.Z));
 }
예제 #13
0
 public static int Dot(Vector3i a, Vector3i b)
 {
     return(a.X * b.X + a.Y * b.Y + a.Z * b.Z);
 }