Esempio n. 1
0
        public static double SquareDistance(SgtVector4D a, SgtVector4D b)
        {
            a.x -= b.x;
            a.y -= b.y;
            a.z -= b.z;
            a.w -= b.w;

            return(a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w);
        }
Esempio n. 2
0
 public static double Dot(SgtVector4D a, SgtVector4D b)
 {
     return(a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w);
 }