Esempio n. 1
0
        public static Vector6D operator +(Vector6D v1, Vector6D v2)
        {
            Vector6D vector = new Vector6D();

            for (int i = 0; i < Count; i++)
            {
                vector[i] = v1[i] + v2[i];
            }
            return(vector);
        }
Esempio n. 2
0
        public static Vector6D operator -(Vector6D v)
        {
            Vector6D vector = new Vector6D();

            for (int i = 0; i < Count; i++)
            {
                vector[i] = -v[i];
            }
            return(vector);
        }
Esempio n. 3
0
        public static Point6D Subtract(Point6D point, Vector6D vector)
        {
            Point6D newPoint = new Point6D();

            for (int i = 0; i < Count; i++)
            {
                newPoint[i] = point[i] - vector[i];
            }
            return(newPoint);
        }
Esempio n. 4
0
        public static Vector6D Subtract(Point6D point1, Point6D point2)
        {
            Vector6D newVector = new Vector6D();

            for (int i = 0; i < Count; i++)
            {
                newVector[i] = point1[i] - point2[i];
            }
            return(newVector);
        }
Esempio n. 5
0
        public Vector6D Normalize()
        {
            double   length = Length;
            Vector6D vector = new Vector6D();

            for (int i = 0; i < Count; i++)
            {
                vector[i] = this[i] / length;
            }
            return(vector);
        }
Esempio n. 6
0
 public Vector6D(Vector6D vector) :
     base(vector.Coords)
 {
 }