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