summaryrefslogtreecommitdiff
path: root/tests/com/google/common/geometry/S2CellIdTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/com/google/common/geometry/S2CellIdTest.java')
-rw-r--r--tests/com/google/common/geometry/S2CellIdTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/com/google/common/geometry/S2CellIdTest.java b/tests/com/google/common/geometry/S2CellIdTest.java
index ce089db..456c542 100644
--- a/tests/com/google/common/geometry/S2CellIdTest.java
+++ b/tests/com/google/common/geometry/S2CellIdTest.java
@@ -193,8 +193,9 @@ public strictfp class S2CellIdTest extends GeometryTestCase {
// Check that the ToPointRaw() returns the center of each cell
// in (s,t) coordinates.
- R2Vector uv = new R2Vector();
- S2Projections.xyzToFaceUV(id.toPointRaw(), uv);
+ S2Point p = id.toPointRaw();
+ int face = S2Projections.xyzToFace(p);
+ R2Vector uv = S2Projections.validFaceXyzToUv(face, p);
assertDoubleNear(
Math.IEEEremainder(S2Projections.uvToST(uv.x), 1.0 / (1 << MAX_WALK_LEVEL)), 0);
assertDoubleNear(