public ivector3d cross_product(ivector3d other) { double i = y * other.z - z * other.y; double j = z * other.x - x * other.z; double k = x * other.y - y * other.x; return(new vector3d(i, j, k)); }
// interface implementations public ivector3d crossP(ivector3d v) { double s1 = Y * v.Z - Z * v.Y; double s2 = Z * v.X - X * v.Z; double s3 = X * v.Y - Y * v.X; return(new vector3d(s1, s2, s3)); }
public ivector3d cross_product(ivector3d v) { double xx = y * v.z - z * v.y; double yy = z * v.x - x * v.z; double zz = x * v.y - y * v.x; return(new vector3d(xx, yy, zz)); }
public double dot_product(ivector3d other) { return(x * other.x + y * other.y + z * other.z); }
public static double dot(ivector3d u, ivector3d v) { return(u.x * v.x + u.y * v.y + u.z * v.z); }
public double dotP(ivector3d v) { return(X * v.X + Y * v.Y + Z * v.Z); }
public static vector3d Cross(ivector3d u, ivector3d v) { vector3d c = new vector3d(u.y * v.z - u.z * v.y, u.z * v.x - u.x * v.z, u.x * v.y - u.y * v.x); return(c); }
public double dot_product(ivector3d v) { return(x * v.x + y * v.y + z * v.z); }