you'd like to know the shortest possible right angle to reach the Point2 from Point1
This would be possible by determining the point in the NorthWest corner (Point3) and calculate the distances Point1<->Point3 and Point2<->Point3.
As the sortest possible distances should be calculated, there has to be a check before: If Point1 is in NorthWest of Point2, the shortest directions are to go south and east.
Point1 in reference to Point2
Directions
North
South
East
West
South
North
West
East
NorthWest
South, East
NorthEast
South, West
SouthWest
North, East
SouthEast
North, West
The only real new logic would be this determination.
The determining of Point3 could be done via the class Bounds, the calculation of the distances via the class Coordinate.
What do you think about this feature? If something is unclear, please ask me. :)
Given you have two Coordinates:
you'd like to know the shortest possible right angle to reach the Point2 from Point1
This would be possible by determining the point in the NorthWest corner (Point3) and calculate the distances Point1<->Point3 and Point2<->Point3.
As the sortest possible distances should be calculated, there has to be a check before: If Point1 is in NorthWest of Point2, the shortest directions are to go south and east.
The only real new logic would be this determination. The determining of Point3 could be done via the class
Bounds
, the calculation of the distances via the classCoordinate
.What do you think about this feature? If something is unclear, please ask me. :)