Function geometry_predicates::predicates::incircle
source · [−]Expand description
Adaptive exact 2D incircle test. Robust.
Return a positive value if the point pd
lies inside the
circle passing through pa
, pb
, and pc
; a negative value if
it lies outside; and zero if the four points are cocircular.
The points pa
, pb
, and pc
must be in counterclockwise
order, or the sign of the result will be reversed.
The result returned is the determinant of a matrix.
This determinant is computed adaptively, in the sense that exact
arithmetic is used only to the degree it is needed to ensure that the
returned value has the correct sign. Hence, incircle()
is usually quite
fast, but will run more slowly when the input points are cocircular or
nearly so.