public Vect3 Lerp(Vect3 end, double t) { return((1 - t) * this + t * end); }
/// <summary> /// Calculate the Dot Product /// </summary> /// <param name="v"></param> /// <returns></returns> public double DotProduct(Vect3 v) { return(X * v.X + Y * v.Y + Z * v.Z); }
protected bool Equals(Vect3 other) { return(X.NearlyEquals(other.X) && Y.NearlyEquals(other.Y) && Z.NearlyEquals(other.Z)); }
/// <summary> /// Calculate the Cross Product /// </summary> /// <param name="b">Other Vector</param> /// <returns>Cross Product</returns> public Vect3 CrossProduct(Vect3 b) { return(new Vect3(Y * b.Z - Z * b.Y, Z * b.X - X * b.Z, X * b.Y - Y * b.X)); }