Esempio n. 1
0
 public Vect3 Lerp(Vect3 end, double t)
 {
     return((1 - t) * this + t * end);
 }
Esempio n. 2
0
 /// <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);
 }
Esempio n. 3
0
 protected bool Equals(Vect3 other)
 {
     return(X.NearlyEquals(other.X) && Y.NearlyEquals(other.Y) && Z.NearlyEquals(other.Z));
 }
Esempio n. 4
0
 /// <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));
 }