Esempio n. 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);
 }
Esempio n. 2
0
 public Vector3i(Vector3i a)
 {
     X = a.X;
     Y = a.Y;
     Z = a.Z;
 }
Esempio n. 3
0
 public static int Dot(Vector3i a, Vector3i b)
 {
     return a.X * b.X + a.Y * b.Y + a.Z * b.Z;
 }
Esempio n. 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));
 }
Esempio n. 5
0
 public static float Distance(Vector3i a, Vector3i b)
 {
     return Mathf.Sqrt(DistanceSquared(a, b));
 }
Esempio n. 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;
 }
Esempio n. 7
0
 public Vector3i(Vector3i a)
 {
     X = a.X;
     Y = a.Y;
     Z = a.Z;
 }
Esempio n. 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));
 }
Esempio n. 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)));
 }
Esempio n. 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)));
 }
Esempio n. 11
0
 public static float Distance(Vector3i a, Vector3i b)
 {
     return(Mathf.Sqrt(DistanceSquared(a, b)));
 }
Esempio n. 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));
 }
Esempio n. 13
0
 public static int Dot(Vector3i a, Vector3i b)
 {
     return(a.X * b.X + a.Y * b.Y + a.Z * b.Z);
 }