private static boolean betweenLongitudes ( double topLeftLon , double bottomRightLon , double lon ) { if ( topLeftLon <= bottomRightLon ) return lon >= topLeftLon && lon <= bottomRightLon ; else return lon >= topLeftLon || lon <= bottomRightLon ; }
Returns true if and only if lon is between the longitudes topLeftLon and bottomRightLon .