public double Dot(Vector3D v) { return x*v.x + y*v.y + z*v.z; }
public void ScaleAdd(double s, Vector3D t1, Vector3D t2) { x = s*t1.x + t2.x; y = s*t1.y + t2.y; z = s*t1.z + t2.z; }
public void Add(Vector3D t1) { x += t1.x; y += t1.y; z += t1.z; }
public void Cross(Vector3D v1, Vector3D v2) { Set(v1.y*v2.z - v1.z*v2.y, v1.z*v2.x - v1.x*v2.z, v1.x*v2.y - v1.y*v2.x); }
public void Add(Vector3D t1, Vector3D t2) { x = t1.x + t2.x; y = t1.y + t2.y; z = t1.z + t2.z; }
protected bool Equals(Vector3D other) { return x.Equals(other.x) && y.Equals(other.y) && z.Equals(other.z); }
public void Subtract(Vector3D t1) { x -= t1.x; y -= t1.y; z -= t1.z; }
public void Subtract(Vector3D t1, Vector3D t2) { x = t1.x - t2.x; y = t1.y - t2.y; z = t1.z - t2.z; }
public void Set(Vector3D t1) { x = t1.x; y = t1.y; z = t1.z; }