Example #1
0
 public bool Equals(Point2DC other)
 {
     if (this.X == other.X)
     {
         return(this.Y == other.Y);
     }
     return(false);
 }
Example #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);
 }
Example #3
0
 public static bool AreApproxEqual(Point2DC a, Point2DC b)
 {
     return(Point2DC.AreApproxEqual(a, b, 8.88178419700125E-16));
 }
Example #4
0
 public static Vector2D Subtract(Point2DC a, Point2DC b)
 {
     return(new Vector2D(a.X - b.X, a.Y - b.Y));
 }
Example #5
0
 public static Point2DC Subtract(Point2DC p, Vector2D v)
 {
     return(new Point2DC(p.X - v.X, p.Y - v.Y));
 }
Example #6
0
 public static Point2DC Add(Point2DC p, Vector2D v)
 {
     return(new Point2DC(p.X + v.X, p.Y + v.Y));
 }
Example #7
0
 public static Vector2D operator -(Point2DC a, Point2DC b)
 {
     return(Point2DC.Subtract(a, b));
 }
Example #8
0
 public static Point2DC operator -(Point2DC p, Vector2D v)
 {
     return(Point2DC.Subtract(p, v));
 }
Example #9
0
 public static Point2DC operator +(Vector2D v, Point2DC p)
 {
     return(Point2DC.Add(p, v));
 }