public static double GetDistance(Point2D p, LocatorItem self) { var dx = p.X - self.X; var dy = p.Y - self.Y; return(GetDistance(dx, dy)); }
private static double GetAngle(LocatorItem self, Point destination) { var selfDirection = self.Angle; var needDirection = (destination - new Point(self)).Angle; if (needDirection < selfDirection) { needDirection += 360; } return(From360To180Degrees(needDirection - selfDirection)); }
public Waypoint(LocatorItem position) : base(position) { }
public Point(LocatorItem position) : this(position.X, position.Y) { }
public static bool ApproximatelyEqual(LocatorItem self, LocatorItem loc, double deviation) { return(Math.Abs(self.X - loc.X) < deviation && Math.Abs(self.Y - loc.Y) < deviation); }