Beispiel #1
0
 public Vector addition(Program b)
 {
     Vector res = new Vector();
     res.x = x + b.x;
     res.y = y + b.y;
     res.z = z + b.z;
     return res;
 }
Beispiel #2
0
        public Vector VectorProduct(Program a, Program b)
        {
            Vector res = new Vector();

            res.x = a.y * b.z - a.z * b.y;
            res.y = a.x * b.z - a.z * b.x;
            res.z = a.x * b.y - a.y * b.x;
            return res;
        }