Exemple #1
0
 // Instance Methods
 public double DotProduct(Vector3D a)
 {
     return a.x * x + a.y * y + a.z * z;
 }
Exemple #2
0
 public Vector3D CrossProduct(Vector3D b)
 {
     double p = y * b.z - z * b.y;
     double q = z * b.x - x * b.z;
     double r = x * b.y - y * b.x;
     return new Vector3D(p, q, r);
 }
Exemple #3
0
 public static Vector3D CrossProduct(Vector3D a, Vector3D b)
 {
     return a.CrossProduct(b);
 }
Exemple #4
0
 // Static methods
 public static double DotProduct(Vector3D a, Vector3D b)
 {
     return a.DotProduct(b);
 }
Exemple #5
0
 public Vector3D(Vector3D a)
 {
     x = a.x; y = a.y; z = a.z;
 }