Home
last modified time | relevance | path

Searched refs:fromDegrees (Results 1 – 10 of 10) sorted by relevance

/external/s2-geometry-library-java/tests/com/google/common/geometry/
DS2LatLngTest.java25 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()
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()
[all …]
DS2LatLngRectTest.java86 S2LatLngRect.fromCenterSize(S2LatLng.fromDegrees(80, 170), S2LatLng.fromDegrees(40, 60)) in testBasic()
89 .fromCenterSize(S2LatLng.fromDegrees(10, 40), S2LatLng.fromDegrees(210, 400)).isFull()); in testBasic()
91 S2LatLngRect.fromCenterSize(S2LatLng.fromDegrees(-90, 180), S2LatLng.fromDegrees(20, 50)) in testBasic()
97 S2LatLngRect.fromPointPair(S2LatLng.fromDegrees(-35, -140), S2LatLng.fromDegrees(15, 155)), in testBasic()
100 S2LatLngRect.fromPointPair(S2LatLng.fromDegrees(25, -70), S2LatLng.fromDegrees(-90, 80)), in testBasic()
113 assertTrue(r1.contains(S2LatLng.fromDegrees(30, -45))); in testBasic()
114 assertTrue(!r1.contains(S2LatLng.fromDegrees(30, 45))); in testBasic()
169 p = p.addPoint(S2LatLng.fromDegrees(0, 0)); in testBasic()
177 rectFromDegrees(70, 150, 80, 170).expanded(S2LatLng.fromDegrees(20, 30)).approxEquals( in testBasic()
179 assertTrue(S2LatLngRect.empty().expanded(S2LatLng.fromDegrees(20, 30)).isEmpty()); in testBasic()
[all …]
DS2PolylineTest.java123 latLngs.add(S2LatLng.fromDegrees(0, 0).toPoint());
124 latLngs.add(S2LatLng.fromDegrees(0, 1).toPoint());
125 latLngs.add(S2LatLng.fromDegrees(0, 2).toPoint());
126 latLngs.add(S2LatLng.fromDegrees(1, 2).toPoint());
132 testPoint = S2LatLng.fromDegrees(0.5, -0.5).toPoint();
135 line.projectToEdge(testPoint, edgeIndex), S2LatLng.fromDegrees(0, 0).toPoint()));
138 testPoint = S2LatLng.fromDegrees(0.5, 0.5).toPoint();
141 line.projectToEdge(testPoint, edgeIndex), S2LatLng.fromDegrees(0, 0.5).toPoint()));
144 testPoint = S2LatLng.fromDegrees(0.5, 1).toPoint();
147 line.projectToEdge(testPoint, edgeIndex), S2LatLng.fromDegrees(0, 1).toPoint()));
[all …]
DS2EdgeUtilTest.java394 S2Point a = S2LatLng.fromDegrees(-0.5, 0).toPoint(); in testGetClosestPoint()
395 S2Point b = S2LatLng.fromDegrees(+0.5, 0).toPoint(); in testGetClosestPoint()
402 S2Point mid = S2LatLng.fromDegrees(0, 0).toPoint(); in testGetClosestPoint()
406 assertEquals(a, S2EdgeUtil.getClosestPoint(S2LatLng.fromDegrees(-1, 0).toPoint(), a, b)); in testGetClosestPoint()
407 assertEquals(b, S2EdgeUtil.getClosestPoint(S2LatLng.fromDegrees(+1, 0).toPoint(), a, b)); in testGetClosestPoint()
410 S2Point x = S2LatLng.fromDegrees(+0.1, 1).toPoint(); in testGetClosestPoint()
411 S2Point expectedClosestPoint = S2LatLng.fromDegrees(+0.1, 0).toPoint(); in testGetClosestPoint()
DS2LoopTest.java107 new S2LatLngRect(S2LatLng.fromDegrees(80, -180), S2LatLng.fromDegrees(90, 180))); in testBounds()
109 new S2LatLngRect(S2LatLng.fromDegrees(-90, -180), S2LatLng.fromDegrees(-80, 180))); in testBounds()
190 assertTrue(candyCane.contains(S2LatLng.fromDegrees(5, 71).toPoint())); in testContains()
492 assertEquals(0d, s1.getDistance(S2LatLng.fromDegrees(0.5, 1).toPoint()).radians(), epsilon);
499 S2Point origin = S2LatLng.fromDegrees(0, 0).toPoint();
DGeometryTestCase.java178 vertices.add(S2LatLng.fromDegrees(lat, lng).toPoint());
DS2CapTest.java21 return S2LatLng.fromDegrees(latDegrees, lngDegrees).toPoint(); in getLatLngPoint()
DS2CellIdTest.java33 S2CellId id = S2CellId.fromLatLng(S2LatLng.fromDegrees(latDegrees, lngDegrees)); in getCellId()
DS2PolygonTest.java333 S2Point origin = S2LatLng.fromDegrees(0, 0).toPoint(); in testGetDistance()
/external/s2-geometry-library-java/src/com/google/common/geometry/
DS2LatLng.java43 public static S2LatLng fromDegrees(double latDegrees, double lngDegrees) { in fromDegrees() method in S2LatLng