Top Description Fields Constructors Methods
org.apache.commons.math3.geometry.spherical.oned

public Class Arc

extends Object
Class Inheritance
Imports
org.apache.commons.math3.exception.NumberIsTooLargeException, org.apache.commons.math3.exception.util.LocalizedFormats, org.apache.commons.math3.geometry.partitioning.Region.Location, org.apache.commons.math3.util.FastMath, .MathUtils, .Precision

This class represents an arc on a circle.
Since
3.3
See Also
ArcsSet

Field Summary

Modifier and TypeField and Description
private final double
lower

The lower angular bound of the arc.

private final double
middle

Middle point of the arc.

private final double
tolerance

Tolerance below which angles are considered identical.

private final double
upper

The upper angular bound of the arc.

Constructor Summary

AccessConstructor and Description
public
Arc(final double
lower angular bound of the arc
lower
,
final double
upper angular bound of the arc
upper
,
final double
tolerance below which angles are considered identical
tolerance
)

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
public Region.Location

Returns:

a code representing the point status: either Location#INSIDE, Location#OUTSIDE or Location#BOUNDARY
checkPoint
(final double
point to check
point
)

Check a point with respect to the arc.

public double

Returns:

barycenter of the arc
getBarycenter
()

Get the barycenter of the arc.

public double

Returns:

lower angular bound of the arc, always between 0 and \( 2 \pi \)
getInf
()

Get the lower angular bound of the arc.

public double

Returns:

angular size of the arc
getSize
()

Get the angular size of the arc.

public double

Returns:

upper angular bound of the arc, always between getInf() and getInf() \( + 2 \pi \)
getSup
()

Get the upper angular bound of the arc.

public double

Returns:

tolerance below which angles are considered identical
getTolerance
()

Get the tolerance below which angles are considered identical.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lowerback to summary
private final double lower

The lower angular bound of the arc.

middleback to summary
private final double middle

Middle point of the arc.

toleranceback to summary
private final double tolerance

Tolerance below which angles are considered identical.

upperback to summary
private final double upper

The upper angular bound of the arc.

Constructor Detail

Arcback to summary
public Arc(final double lower, final double upper, final double tolerance) throws NumberIsTooLargeException

Simple constructor.

If either lower is equals to upper 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 than upper (an exception is thrown in this case). lower will be canonicalized between 0 and \( 2 \pi \), and upper shifted accordingly, so the getInf() and getSup() may not return the value used at instance construction.

Parameters
lower:double

lower angular bound of the arc

upper:double

upper angular bound of the arc

tolerance:double

tolerance below which angles are considered identical

Exceptions
NumberIsTooLargeException:
if lower is greater than upper

Method Detail

checkPointback to summary
public Region.Location checkPoint(final double point)

Check a point with respect to the arc.

Parameters
point:double

point to check

Returns:Region.Location

a code representing the point status: either Location#INSIDE, Location#OUTSIDE or Location#BOUNDARY

getBarycenterback to summary
public double getBarycenter()

Get the barycenter of the arc.

Returns:double

barycenter of the arc

getInfback to summary
public double getInf()

Get the lower angular bound of the arc.

Returns:double

lower angular bound of the arc, always between 0 and \( 2 \pi \)

getSizeback to summary
public double getSize()

Get the angular size of the arc.

Returns:double

angular size of the arc

getSupback to summary
public double getSup()

Get the upper angular bound of the arc.

Returns:double

upper angular bound of the arc, always between getInf() and getInf() \( + 2 \pi \)

getToleranceback to summary
public double getTolerance()

Get the tolerance below which angles are considered identical.

Returns:double

tolerance below which angles are considered identical