expensiveSign

This function is invoked by Sign() if the sign of the determinant is uncertain. It always returns a non-zero result unless two of the input points are the same. It uses a combination of multiple-precision arithmetic and symbolic perturbations to ensure that its results are always self-consistent (cf. Simulation of Simplicity, Edelsbrunner and Muecke). The basic idea is to assign an infinitesimal symbolic perturbation to every possible S2Point such that no three S2Points are collinear and no four S2Points are coplanar. These perturbations are so small that they do not affect the sign of any determinant that was non-zero before the perturbations. If "perturb" is false, then instead the exact sign of the unperturbed input points is returned, which can be zero even when all three points are distinct.

Unlike Sign(), this method does not require the input points to be normalized.

int
expensiveSign
(,,,
bool perturb = true
)

Meta