@Test public void testAngles() { assertEquals(SphericalUtil.computeAngleBetween(up, up), 0, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(down, down), 0, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(left, left), 0, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(right, right), 0, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(front, front), 0, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(back, back), 0, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(up, front), Math.PI / 2, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(up, right), Math.PI / 2, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(up, back), Math.PI / 2, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(up, left), Math.PI / 2, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(down, front), Math.PI / 2, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(down, right), Math.PI / 2, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(down, back), Math.PI / 2, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(down, left), Math.PI / 2, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(back, up), Math.PI / 2, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(back, right), Math.PI / 2, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(back, down), Math.PI / 2, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(back, left), Math.PI / 2, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(up, down), Math.PI, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(front, back), Math.PI, 1e-6); assertEquals(SphericalUtil.computeAngleBetween(left, right), Math.PI, 1e-6); }
static double computeAngleBetween(LatLng from, LatLng to) { return distanceRadians(toRadians(from.latitude), toRadians(from.longitude), toRadians(to.latitude), toRadians(to.longitude)); }
SphericalUtil { static double computeAngleBetween(LatLng from, LatLng to) { return distanceRadians(toRadians(from.latitude), toRadians(from.longitude), toRadians(to.latitude), toRadians(to.longitude)); } }
SphericalUtil { static double computeAngleBetween(LatLng from, LatLng to) { return distanceRadians(toRadians(from.latitude), toRadians(from.longitude), toRadians(to.latitude), toRadians(to.longitude)); } private  SphericalUtil(); }
SphericalUtil { static double computeAngleBetween(LatLng from, LatLng to) { return distanceRadians(toRadians(from.latitude), toRadians(from.longitude), toRadians(to.latitude), toRadians(to.longitude)); } private  SphericalUtil(); static double computeHeading(LatLng from, LatLng to); static LatLng computeOffset(LatLng from, double distance, double heading); static LatLng computeOffsetOrigin(LatLng to, double distance, double heading); static LatLng interpolate(LatLng from, LatLng to, double fraction); static double computeDistanceBetween(LatLng from, LatLng to); static double computeLength(List<LatLng> path); static double computeArea(List<LatLng> path); static double computeSignedArea(List<LatLng> path); }
SphericalUtil { static double computeAngleBetween(LatLng from, LatLng to) { return distanceRadians(toRadians(from.latitude), toRadians(from.longitude), toRadians(to.latitude), toRadians(to.longitude)); } private  SphericalUtil(); static double computeHeading(LatLng from, LatLng to); static LatLng computeOffset(LatLng from, double distance, double heading); static LatLng computeOffsetOrigin(LatLng to, double distance, double heading); static LatLng interpolate(LatLng from, LatLng to, double fraction); static double computeDistanceBetween(LatLng from, LatLng to); static double computeLength(List<LatLng> path); static double computeArea(List<LatLng> path); static double computeSignedArea(List<LatLng> path);  }