Exemplo n.º 1
0
        public static double GetDistance(Point2D p, LocatorItem self)
        {
            var dx = p.X - self.X;
            var dy = p.Y - self.Y;

            return(GetDistance(dx, dy));
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
 public Waypoint(LocatorItem position) : base(position)
 {
 }
Exemplo n.º 4
0
 public Point(LocatorItem position) : this(position.X, position.Y)
 {
 }
Exemplo n.º 5
0
 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);
 }