Exemple #1
0
 public Vector3D(double a1, Vector3D u1, double a2, Vector3D u2, double a3, Vector3D u3, double a4, Vector3D u4)
 {
     this.x = MathArrays.linearCombination(a1, u1.x, a2, u2.x, a3, u3.x, a4, u4.x);
     this.y = MathArrays.linearCombination(a1, u1.y, a2, u2.y, a3, u3.y, a4, u4.y);
     this.z = MathArrays.linearCombination(a1, u1.z, a2, u2.z, a3, u3.z, a4, u4.z);
 }
Exemple #2
0
        public Vector3D crossProduct(Vector3D v)
        {
            Vector3D v3 = (Vector3D)v;

            return(new Vector3D(MathArrays.linearCombination(this.y, v3.z, -this.z, v3.y), MathArrays.linearCombination(this.z, v3.x, -this.x, v3.z), MathArrays.linearCombination(this.x, v3.y, -this.y, v3.x)));
        }
Exemple #3
0
 public Vector3D(double a1, Vector3D u1, double a2, Vector3D u2)
 {
     this.x = MathArrays.linearCombination(a1, u1.x, a2, u2.x);
     this.y = MathArrays.linearCombination(a1, u1.y, a2, u2.y);
     this.z = MathArrays.linearCombination(a1, u1.z, a2, u2.z);
 }
Exemple #4
0
        public double dotProduct(Vector3D v)
        {
            Vector3D v3 = (Vector3D)v;

            return(MathArrays.linearCombination(this.x, v3.x, this.y, v3.y, this.z, v3.z));
        }