Esempio n. 1
0
 internal static float DotProduct(ref Vector3F vector1, ref Vector3F vector2)
 {
     return(vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z);
 }
Esempio n. 2
0
 public bool Equals(Vector3F value)
 {
     return(Equals(this, value));
 }
Esempio n. 3
0
 public static Vector3F Multiply(float scalar, Vector3F vector)
 {
     return(new Vector3F(vector.X * scalar, vector.Y * scalar, vector.Z * scalar));
 }
Esempio n. 4
0
 public static float DotProduct(Vector3F vector1, Vector3F vector2)
 {
     return(DotProduct(ref vector1, ref vector2));
 }
Esempio n. 5
0
 public static Point3F Subtract(Vector3F vector, Point3F point)
 {
     return(new Point3F(vector.X - point.X, vector.Y - point.Y, vector.Z - point.Z));
 }
Esempio n. 6
0
 public static Point3F Add(Vector3F vector, Point3F point)
 {
     return(new Point3F(vector.X + point.X, vector.Y + point.Y, vector.Z + point.Z));
 }
Esempio n. 7
0
 public static Vector3F Subtract(Vector3F vector1, Vector3F vector2)
 {
     return(new Vector3F(vector1.X - vector2.X, vector1.Y - vector2.Y, vector1.Z - vector2.Z));
 }
Esempio n. 8
0
 public static Vector3F Add(Vector3F vector1, Vector3F vector2)
 {
     return(new Vector3F(vector1.X + vector2.X, vector1.Y + vector2.Y, vector1.Z + vector2.Z));
 }
Esempio n. 9
0
 public static float AngleBetween(Vector3F vector1, Vector3F vector2)
 {
     vector1.Normalize();
     vector2.Normalize();
     return(RadiansToDegrees(DotProduct(vector1, vector2) >= 0.0f ? 2.0f * ( float )Math.Asin((vector1 - vector2).Length / 2.0f) : ( float )Math.PI - 2.0f * ( float )Math.Asin((-vector1 - vector2).Length / 2.0f)));
 }