Exemple #1
0
 public bool Equals(Point2DC other)
 {
     if (this.X == other.X)
     {
         return(this.Y == other.Y);
     }
     return(false);
 }
Exemple #2
0
 public static bool AreApproxEqual(Point2DC a, Point2DC b, double tolerance)
 {
     if (System.Math.Abs(b.X - a.X) <= tolerance)
     {
         return(System.Math.Abs(b.Y - a.Y) <= tolerance);
     }
     return(false);
 }
Exemple #3
0
 public static bool AreApproxEqual(Point2DC a, Point2DC b)
 {
     return(Point2DC.AreApproxEqual(a, b, 8.88178419700125E-16));
 }
Exemple #4
0
 public static Vector2D Subtract(Point2DC a, Point2DC b)
 {
     return(new Vector2D(a.X - b.X, a.Y - b.Y));
 }
Exemple #5
0
 public static Point2DC Subtract(Point2DC p, Vector2D v)
 {
     return(new Point2DC(p.X - v.X, p.Y - v.Y));
 }
Exemple #6
0
 public static Point2DC Add(Point2DC p, Vector2D v)
 {
     return(new Point2DC(p.X + v.X, p.Y + v.Y));
 }
Exemple #7
0
 public static Vector2D operator -(Point2DC a, Point2DC b)
 {
     return(Point2DC.Subtract(a, b));
 }
Exemple #8
0
 public static Point2DC operator -(Point2DC p, Vector2D v)
 {
     return(Point2DC.Subtract(p, v));
 }
Exemple #9
0
 public static Point2DC operator +(Vector2D v, Point2DC p)
 {
     return(Point2DC.Add(p, v));
 }