Class Arc
- java.lang.Object
-
- org.apache.commons.math3.geometry.spherical.oned.Arc
-
public class Arc extends java.lang.Object
This class represents an arc on a circle.- Since:
- 3.3
- See Also:
ArcsSet
-
-
Constructor Summary
Constructors Constructor Description Arc(double lower, double upper, double tolerance)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Region.Location
checkPoint(double point)
Check a point with respect to the arc.double
getBarycenter()
Get the barycenter of the arc.double
getInf()
Get the lower angular bound of the arc.double
getSize()
Get the angular size of the arc.double
getSup()
Get the upper angular bound of the arc.double
getTolerance()
Get the tolerance below which angles are considered identical.
-
-
-
Field Detail
-
lower
private final double lower
The lower angular bound of the arc.
-
upper
private final double upper
The upper angular bound of the arc.
-
middle
private final double middle
Middle point of the arc.
-
tolerance
private final double tolerance
Tolerance below which angles are considered identical.
-
-
Constructor Detail
-
Arc
public Arc(double lower, double upper, double tolerance) throws NumberIsTooLargeException
Simple constructor.If either
lower
is equals toupper
or the interval exceeds \( 2 \pi \), the arc is considered to be the full circle and its initial defining boundaries will be forgotten.lower
is not allowed to be greater thanupper
(an exception is thrown in this case).lower
will be canonicalized between 0 and \( 2 \pi \), and upper shifted accordingly, so thegetInf()
andgetSup()
may not return the value used at instance construction.- Parameters:
lower
- lower angular bound of the arcupper
- upper angular bound of the arctolerance
- tolerance below which angles are considered identical- Throws:
NumberIsTooLargeException
- if lower is greater than upper
-
-
Method Detail
-
getInf
public double getInf()
Get the lower angular bound of the arc.- Returns:
- lower angular bound of the arc, always between 0 and \( 2 \pi \)
-
getSup
public double getSup()
Get the upper angular bound of the arc.
-
getSize
public double getSize()
Get the angular size of the arc.- Returns:
- angular size of the arc
-
getBarycenter
public double getBarycenter()
Get the barycenter of the arc.- Returns:
- barycenter of the arc
-
getTolerance
public double getTolerance()
Get the tolerance below which angles are considered identical.- Returns:
- tolerance below which angles are considered identical
-
checkPoint
public Region.Location checkPoint(double point)
Check a point with respect to the arc.- Parameters:
point
- point to check- Returns:
- a code representing the point status: either
Region.Location.INSIDE
,Region.Location.OUTSIDE
orRegion.Location.BOUNDARY
-
-