Package com.google.common.geometry
Class S2Predicates.CompareEdgeDirections
- java.lang.Object
-
- com.google.common.geometry.S2Predicates.CompareEdgeDirections
-
- Enclosing class:
- S2Predicates
static class S2Predicates.CompareEdgeDirections extends java.lang.Object
A test to compare whether two edges are closer to proceeding in the same direction or in opposite directions around the sphere, essentially signum((AxB)x(CxD)). Returns -1, 0, or +1 according to whether the normal of edge AB has negative, zero, or positive dot product with the normal of edge CD, and may return 0 if the relation is indeterminate.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
CompareEdgeDirections()
No instantiation.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
exact(BigPoint a, BigPoint b, BigPoint c, BigPoint d)
Returns a BigDecimal-based test result.static int
exact(S2Point a, S2Point b, S2Point c, S2Point d)
Returns a BigDecimal-based test result.static int
triage(S2Point a, S2Point b, S2Point c, S2Point d)
Returns a cosine-based test result.
-
-
-
Method Detail
-
triage
public static int triage(S2Point a, S2Point b, S2Point c, S2Point d)
Returns a cosine-based test result. Fast but has a wide margin of uncertainty.
-
exact
public static int exact(S2Point a, S2Point b, S2Point c, S2Point d)
Returns a BigDecimal-based test result. Exact but very slow.
-
-