Пример #1
0
        public static double AngleTo(PointD from, PointD to)
        {
            var fRadians = Math.Atan2((to.Y - from.Y), (to.X - from.X));
            var fDegrees = ((AngleD.RadiansToDegrees(fRadians) + 360.0) + AngleD.DegreeOffset) % 360.0;

            return(fDegrees);
        }
Пример #2
0
 public AngleD(double x, double y)
 {
     Degrees = AngleD.RadiansToDegrees(Math.Atan2(y, x)) + DegreeOffset;
 }
Пример #3
0
 public static double XYToDegrees(double x, double y)
 {
     return(AngleD.RadiansToDegrees(Math.Atan2(y, x)) + DegreeOffset);
 }