Exemple #1
0
 /// <summary>
 /// Test la colinéarité entre le veteur this et le vecteur u.
 /// </summary>
 /// <param name="u"></param>
 /// <returns></returns>
 public bool IsColinearTo(Vector2D u)
 {
     return(Math.Abs(Det(u)) < ZERO_APPROX);
 }
Exemple #2
0
 public double Det(Vector2D v)
 {
     return((X * v.Y) - (Y * v.X));
 }
Exemple #3
0
 public double Dot(Vector2D v)
 {
     return((X * v.X) + (Y * v.Y));
 }
Exemple #4
0
 public Vector2D Sub(Vector2D v)
 {
     return(new Vector2D(X - v.X, Y - v.Y));
 }
Exemple #5
0
 public Vector2D Add(Vector2D v)
 {
     return(new Vector2D(X + v.X, Y + v.Y));
 }
Exemple #6
0
 public Vector2D(Vector2D v)
 {
     X = v.X;
     Y = v.Y;
 }