public Point GetLocationOfRelativePoint(LocOri baseLocOri, double relativeDirection, double distance)
 {
     // Note: direction 0.0 is upwards, X and Y coordinates are increasing rightwards and downwards.
     return(new Point()
     {
         X = baseLocOri.Location.X + (int)Math.Round(Math.Sin(Helpers.ToRad(baseLocOri.Orientation + relativeDirection)) * distance),
         Y = baseLocOri.Location.Y - (int)Math.Round(Math.Cos(Helpers.ToRad(baseLocOri.Orientation + relativeDirection)) * distance)
     });
 }
 public IEnumerable <int> ScanRelative(LocOri baseLocOri,
                                       double relativeDirection1, double distance1,
                                       double relativeDirection2, double distance2)
 {
     return(Scan(
                GetLocationOfRelativePoint(baseLocOri, relativeDirection1, distance1),
                GetLocationOfRelativePoint(baseLocOri, relativeDirection2, distance2)
                ));
 }
 public IEnumerable <int> ScanRelative(LocOri basePoint,
                                       double relativeDirection1, double distance1,
                                       double relativeDirection2, double distance2, int?pointNumber)
 {
     return(Scan(
                GetLocationOfRelativePoint(basePoint, relativeDirection1, distance1),
                GetLocationOfRelativePoint(basePoint, relativeDirection2, distance2),
                pointNumber
                ));
 }