public final class Angle extends Object implements Serializable
| Constructor and Description |
|---|
Angle(double value,
AngularUnit unit)
Create an angle.
|
| Modifier and Type | Method and Description |
|---|---|
static Length |
convert(Angle angle)
Convert the given angle to an approximated equivalent linear distance.
|
boolean |
equals(Object o)
Equals implementation.
|
boolean |
equivalent(Angle angle)
Is this angle equivalent to the given angle.
|
boolean |
equivalent(Angle angle,
double tolerance)
Is this angle equivalent to the given angle within the given tolerance.
|
double |
getNormalizedValue()
Get the value of this angle normalized to lie within the inclusive range
of one circular rotation, e.g.
|
double |
getNormalizedValue(AngularUnit unit)
Get the value of this angle normalized to lie within the inclusive range
of one circular rotation.
|
AngularUnit |
getUnit()
Get the unit of this angle.
|
double |
getValue()
Get the value of the angular measure.
|
double |
getValue(AngularUnit au)
Return the value of this angle in the requested unit, converting if necessary.
|
int |
hashCode()
Hashcode implementation.
|
String |
toString() |
public Angle(double value,
AngularUnit unit)
value - a positive or negative angular measureunit - an AngularUnitIllegalArgumentException - if the specified unit is null.public AngularUnit getUnit()
public double getValue()
Angle.getUnit().public double getValue(AngularUnit au)
au - the desired AngularUnit.public double getNormalizedValue()
Angle.getUnit()Angle.getValue(),
Angle.getNormalizedValue(AngularUnit)public double getNormalizedValue(AngularUnit unit)
unit - angular unit of the returned valueIllegalArgumentException - if the specified unit is null.public boolean equivalent(Angle angle)
Angle.equivalent(Angle,double)
with tolerance == 0;angle - angle to test for equivalence.public boolean equivalent(Angle angle, double tolerance)
angle - angle to test for equivalence.tolerance - the tolerance value to test with. Specified in degrees.public static Length convert(Angle angle)
1 Great Circle degree = 111194.87428 meter
The meaning of the input angle determines whether this conversion produces a reasonable result.angle - an anglepublic boolean equals(Object o)
public int hashCode()
© 2007, 2022 Precisely. All rights reserved.