- Object
-
- RobustGeometry
-
public final class RobustGeometry extends Object
This class provides geometric routines that have guarantees about some properties of their floating point results and operations.- Since:
- 3.4.0
- Version:
- 4.2.0
- Author:
- Manolis Tsamis
-
-
Constructor Summary
Constructors Constructor Description RobustGeometry()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
getLocation(Vector2 point, Vector2 linePoint1, Vector2 linePoint2)
Robust side-of-line test.
-
-
-
Method Detail
-
getLocation
public static double getLocation(Vector2 point, Vector2 linePoint1, Vector2 linePoint2)
Robust side-of-line test. Computes the same value withSegment.getLocation(Vector2, Vector2, Vector2)
but with enough precision so the sign of the result is correct for anyVector2
s pa, pb, pc. This implementation uses more precision as-needed only for the hardest cases. For the majority of inputs this will be only slightly slower than the corresponding call toSegment.getLocation(Vector2, Vector2, Vector2)
but in the hard cases can be 5-25 times slower.- Parameters:
point
- the pointlinePoint1
- the first point of the linelinePoint2
- the second point of the line- Returns:
- double
- See Also:
Segment.getLocation(Vector2, Vector2, Vector2)
-
-