Пример #1
0
 public Vect3f Lerp(Vect3f end, float t)
 {
     return((1 - t) * this + t * end);
 }
Пример #2
0
 /// <summary>
 /// Calculate the Dot Product
 /// </summary>
 /// <param name="v"></param>
 /// <returns></returns>
 public float DotProduct(Vect3f v)
 {
     return(X * v.X + Y * v.Y + Z * v.Z);
 }
Пример #3
0
 protected bool Equals(Vect3f other)
 {
     return(X.NearlyEquals(other.X) && Y.NearlyEquals(other.Y) && Z.NearlyEquals(other.Z));
 }
Пример #4
0
 /// <summary>
 /// Calculate the Cross Product
 /// </summary>
 /// <param name="b">Other Vector</param>
 /// <returns>Cross Product</returns>
 public Vect3f CrossProduct(Vect3f b)
 {
     return(new Vect3f(Y * b.Z - Z * b.Y, Z * b.X - X * b.Z, X * b.Y - Y * b.X));
 }