/external/s2-geometry-library-java/tests/com/google/common/geometry/ |
D | S2LatLngTest.java | 36 assertDoubleNear(better.lng().radians(), S1Angle.degrees(-160).radians()); in testBasic() 43 assertDoubleNear(better.lng().radians(), 0); in testBasic() 54 assertDoubleNear( in testConversion() 58 assertDoubleNear( in testConversion() 72 assertDoubleNear(test.lat().degrees(), 1.23456); in testConversion() 73 assertDoubleNear(test.lng().degrees(), 0.98765); in testConversion() 79 assertDoubleNear( in testDistance() 82 assertDoubleNear( in testDistance() 85 assertDoubleNear( in testDistance()
|
D | S2CapTest.java | 38 assertDoubleNear(full.angle().degrees(), 180); in testBasic() 129 assertDoubleNear(rect.latLo().degrees(), -90, kDegreeEps); in testRectBound() 130 assertDoubleNear(rect.latHi().degrees(), 5, kDegreeEps); in testRectBound() 136 assertDoubleNear(rect.lat().lo(), 0); in testRectBound() 137 assertDoubleNear(rect.lat().hi(), S2.M_PI_2); in testRectBound() 142 assertDoubleNear(rect.latLo().degrees(), 0, kDegreeEps); in testRectBound() 143 assertDoubleNear(rect.latHi().degrees(), 90, kDegreeEps); in testRectBound() 149 assertDoubleNear(rect.latLo().degrees(), -90, kDegreeEps); in testRectBound() 150 assertDoubleNear(rect.latHi().degrees(), 90, kDegreeEps); in testRectBound() 155 assertDoubleNear(rect.latLo().degrees(), -20, kDegreeEps); in testRectBound() [all …]
|
D | S2Test.java | 63 assertDoubleNear(S2Projections.uvToST(S2Projections.stToUV(x)), x); in testSTUV() 64 assertDoubleNear(S2Projections.stToUV(S2Projections.uvToST(x)), x); in testSTUV() 102 assertDoubleNear( in testUVNorms() 106 assertDoubleNear( in testUVNorms() 130 assertDoubleNear(S2.angle(p000, pz, p045), S2.M_PI_4); in testAngleArea() 131 assertDoubleNear(S2.angle(p045, pz, p180), 3 * S2.M_PI_4); in testAngleArea() 132 assertDoubleNear(S2.angle(p000, pz, p180), S2.M_PI); in testAngleArea() 133 assertDoubleNear(S2.angle(pz, p000, pz), 0); in testAngleArea() 134 assertDoubleNear(S2.angle(pz, p000, p045), S2.M_PI_2); in testAngleArea() 136 assertDoubleNear(S2.area(p000, p090, pz), S2.M_PI_2); in testAngleArea() [all …]
|
D | S2LatLngRectTest.java | 77 assertDoubleNear(d1.latLo().degrees(), -90); in testBasic() 78 assertDoubleNear(d1.latHi().degrees(), -45); in testBasic() 79 assertDoubleNear(d1.lngLo().degrees(), 0); in testBasic() 80 assertDoubleNear(d1.lngHi().degrees(), 180); in testBasic() 264 assertDoubleNear(4 * Math.PI, S2LatLngRect.full().area()); in testArea() 265 assertDoubleNear(Math.PI / 2, rectFromDegrees(0, 0, 90, 90).area()); in testArea() 270 assertDoubleNear(getEdgeBound(1, 1, 1, 1, -1, 1).lat().hi(), S2.M_PI_4); // Max, in testEdgeBound() 272 assertDoubleNear(getEdgeBound(1, -1, 1, 1, 1, 1).lat().hi(), S2.M_PI_4); // Max, in testEdgeBound() 274 assertDoubleNear(getEdgeBound(1, -1, -1, -1, -1, -1).lat().lo(), -S2.M_PI_4); // Min, in testEdgeBound() 276 assertDoubleNear(getEdgeBound(-1, 1, -1, -1, -1, -1).lat().lo(), -S2.M_PI_4); // Min, in testEdgeBound() [all …]
|
D | S2EdgeUtilTest.java | 167 assertDoubleNear(getEdgeBound(1, 1, 1, 1, -1, 1).lat().hi(), S2.M_PI_4); in testRectBounder() 169 assertDoubleNear(getEdgeBound(1, -1, 1, 1, 1, 1).lat().hi(), S2.M_PI_4); in testRectBounder() 171 assertDoubleNear(getEdgeBound(1, -1, -1, -1, -1, -1).lat().lo(), -S2.M_PI_4); in testRectBounder() 173 assertDoubleNear(getEdgeBound(-1, 1, -1, -1, -1, -1).lat().lo(), -S2.M_PI_4); in testRectBounder() 176 assertDoubleNear(getEdgeBound(.3, .4, 1, -.3, -.4, 1).lat().hi(), S2.M_PI_2); in testRectBounder() 177 assertDoubleNear(getEdgeBound(.3, .4, -1, -.3, -.4, -1).lat().lo(), -S2.M_PI_2); in testRectBounder()
|
D | GeometryTestCase.java | 37 public void assertDoubleNear(double a, double b) { in assertDoubleNear() method in GeometryTestCase 38 assertDoubleNear(a, b, 1e-9); in assertDoubleNear() 41 public void assertDoubleNear(double a, double b, double error) { in assertDoubleNear() method in GeometryTestCase
|
D | S1IntervalTest.java | 88 assertDoubleNear(new S1Interval(3.1, 2.9).getCenter(), 3.0 - S2.M_PI); in testBasic() 89 assertDoubleNear(new S1Interval(-2.9, -3.1).getCenter(), S2.M_PI - 3.0); in testBasic() 90 assertDoubleNear(new S1Interval(2.1, -2.1).getCenter(), S2.M_PI); in testBasic() 98 assertDoubleNear(quad123.getCenter(), 0.75 * S2.M_PI); in testBasic() 99 assertDoubleNear(quad123.getLength(), 1.5 * S2.M_PI); in testBasic()
|
D | S2CellTest.java | 53 assertDoubleNear(cell.getVertexRaw(k).dotProd(cell.getEdgeRaw(k)), 0); in testFaces() 54 assertDoubleNear(cell.getVertexRaw((k + 1) & 3).dotProd( in testFaces() 56 assertDoubleNear(S2Point.normalize( in testFaces() 345 assertDoubleNear(avgMetric.getValue(level), avgValue, 10 * tolerance); in testMinMaxAvg()
|
D | S2PolygonTest.java | 189 assertDoubleNear(latLng.latDegrees(), lat, error); 190 assertDoubleNear(latLng.lngDegrees(), lng, error);
|
D | S2CellIdTest.java | 199 assertDoubleNear(Math.IEEEremainder( in testContinuity() 201 assertDoubleNear(Math.IEEEremainder( in testContinuity()
|
D | S2LoopTest.java | 114 assertDoubleNear(arctic80.getRectBound().latHi().radians(), new S2LatLng(mid).lat().radians()); in testBounds() 122 assertDoubleNear(northHemi.getArea(), 2 * S2.M_PI); in testAreaCentroid() 123 assertDoubleNear(eastHemi.getArea(), 2 * S2.M_PI); in testAreaCentroid()
|