Expand description
Implementation of the floating point expansions found in Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates by Shewchuk in a more Rusty style. Double precision only.
Functions§
- cross_
2d - Computes the determinant of the following matrix
- in_
circle - Returns a positive number if
dis inside the oriented circle that goes througha,b,c, a negative number if it lies outside, and 0 ifa,b,c,dare cocircular ora,b,care collinear. Ifa,b,care in counterclockwise order, “inside the circle” is the inside. Ifa,b,care in clockwise order, “inside the circle” is the outside. - in_
sphere - Returns a positive number if
eis inside the oriented sphere that goes througha,b,c,d, a negative number if it lies outside, and 0 ifa,b,c,d,eare cospherical ora,b,c,dare coplanar. Ifa,b,c,dare oriented positive, “inside the sphere” is the inside. Ifa,b,c,dare oriented negative, “inside the sphere” is the outside. - magnitude_
cmp_ 2d - Compares the magnitude of
aandband returns a positive number ifa’s magnitude is greater, a negative number ifb’s magnitude is greater, and 0 if their magnitudes equal. - magnitude_
cmp_ 3d - Compares the magnitude of
aandband returns a positive number ifa’s magnitude is greater, a negative number ifb’s magnitude is greater, and 0 if their magnitudes equal. - orient_
2d - Calculates the orientation of points
a,b,cin a plane. Returns twice the area of the triangle formed bya,b, andc, which is a positive number if they define a left turn, a negative number if they define a right turn, and 0 if they are collinear. - orient_
3d - Calculates the orientation of points
a,b,c,din a space. Returns 6 times the volume of the tetrahedron formed bya,b,c,d, which is a positive number ifb→c→ddefines a left turn when looked at froma, a negative number if they define a right turn, and 0 ifa,b,c,dare coplanar. - sign_
det_ x2y2_ plus_ 2x_ det_ x - Computes the following sum of determinants.
- sign_
det_ x2y2z2_ plus_ 2x_ det_ x - Computes the following sum of determinants.
- sign_
det_ x_ x2y2 - Computes the determinant of the following matrix
- sign_
det_ x_ x2y2_ plus_ 2x_ det_ x_ y - Computes the following sum of determinants.
- sign_
det_ x_ x2y2z2 - Computes the determinant of the following matrix
- sign_
det_ x_ x2y2z2_ plus_ 2x_ det_ x_ y - Computes the following sum of determinants.
- sign_
det_ x_ y_ x2y2z2 - Computes the determinant of the following matrix
- sign_
det_ x_ y_ x2y2z2_ plus_ 2x_ det_ x_ y_ z - Computes the following sum of determinants