public Vector2d(Point2d a, Point2d b) { base.X = a.X - b.X; base.Y = a.Y - b.Y; }
public static Vector2d Subtract(Point2d a, Point2d b) { return(new Vector2d(a.X - b.X, a.Y - b.Y)); }
public static Vector2d Add(Point2d a, Point2d b) { return(new Vector2d(a.X + b.X, a.Y + b.Y)); }
public static double DotProduct(Point2d b, Vector2d a) { return(a.X * b.X + a.Y * b.Y); }
public static bool IsEqual(Point2d a, Point2d b) { return(Point2d.Distance(a, b) <= Utility.Domain); }
public static double Distance(Point2d a, Point2d b) { return(Utility.Round(Math.Sqrt(Math.Pow((a.X - b.X), 2) + Math.Pow((a.Y - b.Y), 2)))); }
public double DistanceTo(Point2d b) { return(Point2d.Distance(this, b)); }
public Point2d(Point2d otherPoint) { X = otherPoint.X; Y = otherPoint.Y; }