@Test
public void testCrossingAntimeridian()
{
final Location one = new Location(Latitude.degrees(37), Longitude.degrees(179.998));
final Location two = new Location(Latitude.degrees(37), Longitude.degrees(179.999));
final Location thr = new Location(Latitude.degrees(37), Longitude.degrees(180.0));
final Location fur = new Location(Latitude.degrees(37), Longitude.degrees(-179.999));
logger.info("one equirectangular two: {}", one.equirectangularDistanceTo(two));
logger.info("two equirectangular thr: {}", two.equirectangularDistanceTo(thr));
logger.info("thr equirectangular fur: {}", thr.equirectangularDistanceTo(fur));
logger.info("one haversine two: {}", one.haversineDistanceTo(two));
logger.info("two haversine thr: {}", two.haversineDistanceTo(thr));
logger.info("thr haversine fur: {}", thr.haversineDistanceTo(fur));
logger.info("one mixed two: {}", one.distanceTo(two));
logger.info("two mixed thr: {}", two.distanceTo(thr));
logger.info("thr mixed fur: {}", thr.distanceTo(fur));
logger.info("one heading two: {}", one.headingTo(two));
logger.info("two heading thr: {}", two.headingTo(thr));
logger.info("thr heading fur: {}", thr.headingTo(fur));
Assert.assertEquals(one.distanceTo(two).asMeters(), two.distanceTo(thr).asMeters(), 3);
Assert.assertEquals(two.distanceTo(thr).asMeters(), thr.distanceTo(fur).asMeters(), 3);
Assert.assertEquals(one.headingTo(two).asDegrees(), two.headingTo(thr).asDegrees(), 3);
Assert.assertEquals(two.headingTo(thr).asDegrees(), thr.headingTo(fur).asDegrees(), 3);
}