mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Tidied code, added MidPoint to CompoundMark class
Compound Mark class is now constructed with a list of marks. A mid point is created on its construction for use in Geo Calculations #story[1124] #pair[wmu16, hyi25]
This commit is contained in:
@@ -45,6 +45,19 @@ public class GeoUtility {
|
||||
return (Math.toDegrees(getBearingRad(p1, p2)) + 360.0) % 360.0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* WARNING: this function DOES NOT account for wrapping around on lats / longs etc.
|
||||
* SO BE CAREFUL IN USING THIS FUNCTION
|
||||
*
|
||||
* @param p1 GeoPoint 1
|
||||
* @param p2 GeoPoint 2
|
||||
* @return GeoPoint midPoint
|
||||
*/
|
||||
public static GeoPoint getDirtyMidPoint(GeoPoint p1, GeoPoint p2) {
|
||||
return new GeoPoint((p1.getLat() + p2.getLat()) / 2, (p1.getLng() + p2.getLng()) / 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the angle between to angular co-ordinates on a sphere in radians.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user