Пример #1
0
 protected bool Equals(Vector3F other)
 {
     return(X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z));
 }
Пример #2
0
 public bool Eq(Vector3F vec)
 {
     return((int)(float)System.Math.Round(X) == (int)(float)System.Math.Round(vec.X) &&
            (int)(float)System.Math.Round(Y) == (int)(float)System.Math.Round(vec.Y) &&
            (int)(float)System.Math.Round(Z) == (int)(float)System.Math.Round(vec.Z));
 }
Пример #3
0
 public double Dot(Vector3F v2)
 {
     return(X * v2.X + Y * v2.Y + Z * v2.Z);
 }
Пример #4
0
 public Vector3F Cross(Vector3F v2)
 {
     return(new Vector3F(Y * v2.Z - Z * v2.Y,
                         Z * v2.X - X * v2.Z,
                         X * v2.Y - Y * v2.X));
 }
Пример #5
0
        public float DistanceTo(Vector3F b)
        {
            Vector3F vector = new Vector3F(X - b.X, Y - b.Y, Z - b.Z);

            return((float)System.Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y + vector.Z * vector.Z));
        }