Class S2Predicates.CompareDistance

  • Enclosing class:
    S2Predicates

    static class S2Predicates.CompareDistance
    extends java.lang.Object
    A set of tests to compare the distance XY and a previously computed distance. When doing many distance tests, this saves a lot of work over computing exact distances only to throw away most of them. Each test returns -1 if the distance XY is less than 'r2', +1 if the distance XY is greater than 'r2', and 0 if the distances are exactly equal or the relation is indeterminate.