Function geometry_predicates::predicates::insphere[][src]

pub fn insphere(
    pa: [f64; 3],
    pb: [f64; 3],
    pc: [f64; 3],
    pd: [f64; 3],
    pe: [f64; 3]
) -> f64

Adaptive exact 3D insphere test. Robust.

Return a positive value if the point pe lies inside the sphere passing through pa, pb, pc, and pd; a negative value if it lies outside; and zero if the five points are cospherical. The points pa, pb, pc, and pd must be ordered so that they have a positive orientation (as defined by orient3d()), 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, insphere() is usually quite fast, but will run more slowly when the input points are cospherical or nearly so.