public static double cosineOrHaversineDeg ( double lat1 , double lon1 , double lat2 , double lon2 ) { return cosineOrHaversineRad ( deg2rad ( lat1 ) , deg2rad ( lon1 ) , deg2rad ( lat2 ) , deg2rad ( lon2 ) ) ; }
Use cosine or haversine dynamically .