Lines Matching refs:S2LatLng
21 S2LatLng llRad = S2LatLng.fromRadians(S2.M_PI_4, S2.M_PI_2); in testBasic()
25 S2LatLng llDeg = S2LatLng.fromDegrees(45, 90); in testBasic()
28 assertTrue(!S2LatLng.fromDegrees(-91, 0).isValid()); in testBasic()
29 assertTrue(!S2LatLng.fromDegrees(0, 181).isValid()); in testBasic()
31 S2LatLng bad = S2LatLng.fromDegrees(120, 200); in testBasic()
33 S2LatLng better = bad.normalized(); in testBasic()
38 bad = S2LatLng.fromDegrees(-100, -360); in testBasic()
45 assertTrue((S2LatLng.fromDegrees(10, 20).add(S2LatLng.fromDegrees(20, 30))).approxEquals( in testBasic()
46 S2LatLng.fromDegrees(30, 50))); in testBasic()
47 assertTrue((S2LatLng.fromDegrees(10, 20).sub(S2LatLng.fromDegrees(20, 30))).approxEquals( in testBasic()
48 S2LatLng.fromDegrees(-10, -10))); in testBasic()
49 assertTrue((S2LatLng.fromDegrees(10, 20).mul(0.5)).approxEquals(S2LatLng.fromDegrees(5, 10))); in testBasic()
55 new S2LatLng(S2LatLng.fromDegrees(90.0, 65.0).toPoint()).lat().degrees(), 90.0); in testConversion()
57 new S2LatLng(S2LatLng.fromRadians(-S2.M_PI_2, 1).toPoint()).lat().radians(), -S2.M_PI_2); in testConversion()
59 Math.abs(new S2LatLng(S2LatLng.fromDegrees(12.2, 180.0).toPoint()).lng().degrees()), 180.0); in testConversion()
61 Math.abs(new S2LatLng(S2LatLng.fromRadians(0.1, -S2.M_PI).toPoint()).lng().radians()), in testConversion()
67 assertTrue(S2.approxEquals(p, new S2LatLng(p).toPoint())); in testConversion()
71 S2LatLng test = S2LatLng.fromE5(123456, 98765); in testConversion()
78 S2LatLng.fromDegrees(90, 0).getDistance(S2LatLng.fromDegrees(90, 0)).radians(), 0.0); in testDistance()
80 S2LatLng.fromDegrees(-37, 25).getDistance(S2LatLng.fromDegrees(-66, -155)).degrees(), 77, in testDistance()
83 S2LatLng.fromDegrees(0, 165).getDistance(S2LatLng.fromDegrees(0, -80)).degrees(), 115, in testDistance()
86 S2LatLng.fromDegrees(47, -127).getDistance(S2LatLng.fromDegrees(-47, 53)).degrees(), 180, in testDistance()