|
Jeospace API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jeospace.measure.angle.DecimalAngle
DecimalAngle provides a concrete implementation of Angle
which is designed for high performance usage in conjunction with java.lang.Math
trigonometric methods - or other functions which require double precision floating
point representations of angular measurements.
Angle,
AngleNorm,
AngleSign,
DecimalAngleUnit,
Latitude,
Longitude,
SexagesimalAngle,
SexagesimalAngleType,
SexagesimalAngleUnit| Field Summary | |
protected double |
angle
The value of this DecimalAngle object. |
| Constructor Summary | |
DecimalAngle()
Construct a DecimalAngle initialized to a value of 0. |
|
DecimalAngle(Angle ang)
Construct a DecimalAngle initialized to the specified value. |
|
DecimalAngle(DecimalAngleUnit units,
double value)
Construct a DecimalAngle initialized to the value and units specified. |
|
DecimalAngle(SexagesimalAngleType type,
AngleSign sign,
double unitsValue)
Construct a DecimalAngle initialized to the value and units specified. |
|
DecimalAngle(SexagesimalAngleType type,
AngleSign sign,
int unitsValue,
double minutes)
Construct a DecimalAngle initialized to the value and units specified. |
|
DecimalAngle(SexagesimalAngleType type,
AngleSign sign,
int unitsValue,
int minutes,
double seconds)
Construct a DecimalAngle initialized to the value and units specified. |
|
DecimalAngle(SexagesimalAngleType type,
AngleSign sign,
int unitsValue,
int minutes,
int seconds,
int microseconds)
Construct a DecimalAngle initialized to the value and units specified. |
|
| Method Summary | |
void |
add(Angle ang)
Add to this DecimalAngle the passed Angle. |
void |
add(DecimalAngleUnit units,
double value)
Add to this DecimalAngle the double value in the specified DecimalAngleUnits. |
void |
add(SexagesimalAngleUnit units,
int value)
Add to this DecimalAngle the value in the specified SexagesimalAngleUnits. |
void |
changeSign()
Change the sign of this DecimalAngle. |
void |
clear()
Set the value of this DecimalAngle to 0. |
java.lang.Object |
clone()
Return a copy of this DecimalAngle object. |
int |
compareTo(Angle that)
Compare this object with the argument for order. |
int |
compareTo(java.lang.Object obj)
Compare this object with the argument for order. |
boolean |
equals(java.lang.Object obj)
Compare two Angles for equality. |
double |
get(DecimalAngleUnit units)
Return the double value of this DecimalAngle in the specified DecimalAngleUnits. |
AngleSign |
getSign()
Get the AngleSign of this DecimalAngle. |
long |
getValueInMicroseconds(SexagesimalAngleType type)
Return the long value of this DecimalAngle in units of microseconds of
the specified SexagesimalAngleType. |
int |
hashCode()
Return the hashcode |
void |
normalize(AngleNorm option)
Normalize the value of this DecimalAngle as specified by the option field. |
static double |
normalizeDegrees(double degrees)
Normalize and return the double degree value. |
static double |
normalizeDegreesNegative(double degrees)
Normalize the double degree value to an equivalent negative value and return. |
static double |
normalizeDegreesPositive(double degrees)
Normalize the double degree value to an equivalent positive value and return. |
static double |
normalizeRadians(double radians)
Normalize and return the double radian value. |
static double |
normalizeRadiansNegative(double radians)
Normalize the double radian value to an equivalent negative value and return. |
static double |
normalizeRadiansPositive(double radians)
Normalize the double radian value to an equivalent positive value and return. |
void |
set(Angle ang)
Set this DecimalAngle to the specified value. |
void |
set(DecimalAngleUnit units,
double value)
Set the value of this DecimalAngle to the specified DecimalAngleUnits value. |
void |
set(SexagesimalAngleType type,
AngleSign sign,
double unitsValue)
Set this DecimalAngle to the specified value in the SexagesimalAngleType. |
void |
set(SexagesimalAngleType type,
AngleSign sign,
int unitsValue,
double minutes)
Set this DecimalAngle to the specified value in the SexagesimalAngleType. |
void |
set(SexagesimalAngleType type,
AngleSign sign,
int unitsValue,
int minutes,
double seconds)
Set this DecimalAngle to the specified value in the SexagesimalAngleType. |
void |
set(SexagesimalAngleType type,
AngleSign sign,
int unitsValue,
int minutes,
int seconds,
int microseconds)
Set this DecimalAngle to the specified value in the SexagesimalAngleType. |
void |
setValueInMicroseconds(SexagesimalAngleType type,
long value)
Set this DecimalAngle to the specified value of microseconds of
the SexagesimalAngleType. |
void |
subtract(Angle ang)
Subtract from this DecimalAngle the passed Angle. |
java.lang.String |
toString()
Return a string representation of this DecimalAngle in decimal degrees. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected double angle
DecimalAngle object.
| Constructor Detail |
public DecimalAngle()
DecimalAngle initialized to a value of 0.
public DecimalAngle(Angle ang)
DecimalAngle initialized to the specified value.
ang - the Angle object to duplicate.
public DecimalAngle(DecimalAngleUnit units,
double value)
DecimalAngle initialized to the value and units specified.
units - the DecimalAngleUnits of value being input.value - the input value
public DecimalAngle(SexagesimalAngleType type,
AngleSign sign,
double unitsValue)
DecimalAngle initialized to the value and units specified.
type - the SexagesimalAngleType.sign - the AngleSign.unitsValue - the double value of the primary units of the SexagesimalAngleType.
public DecimalAngle(SexagesimalAngleType type,
AngleSign sign,
int unitsValue,
double minutes)
DecimalAngle initialized to the value and units specified.
type - the SexagesimalAngleType.sign - the AngleSign.unitsValue - the integer value of the primary units of the SexagesimalAngleType.minutes - the double value of the minutes sub-unit of the SexagesimalAngleType.
public DecimalAngle(SexagesimalAngleType type,
AngleSign sign,
int unitsValue,
int minutes,
double seconds)
DecimalAngle initialized to the value and units specified.
type - the SexagesimalAngleType.sign - the AngleSign.unitsValue - the integer value of the primary units of the SexagesimalAngleType.minutes - the integer value of the minutes sub-unit of the SexagesimalAngleType.seconds - the double value of the seconds sub-unit of the SexagesimalAngleType.
public DecimalAngle(SexagesimalAngleType type,
AngleSign sign,
int unitsValue,
int minutes,
int seconds,
int microseconds)
DecimalAngle initialized to the value and units specified.
type - the SexagesimalAngleType.sign - the AngleSign.unitsValue - the integer value of the primary units of the SexagesimalAngleType.minutes - the integer value of the minutes sub-unit of the SexagesimalAngleType.seconds - the integer value of the seconds sub-unit of the SexagesimalAngleType.microseconds - the integer value of the microseconds sub-unit of the
SexagesimalAngleType.| Method Detail |
public void set(Angle ang)
DecimalAngle to the specified value.
set in interface Angleang - the Angle object to duplicate.public void clear()
DecimalAngle to 0.
clear in interface Anglepublic void changeSign()
DecimalAngle.
changeSign in interface Anglepublic AngleSign getSign()
AngleSign of this DecimalAngle.
getSign in interface AngleAngleSign.POSITIVE by default.public void add(Angle ang)
DecimalAngle the passed Angle.
add in interface Angleang - an Angle.public void subtract(Angle ang)
DecimalAngle the passed Angle.
subtract in interface Angleang - an Angle.public void normalize(AngleNorm option)
DecimalAngle as specified by the option field.
normalize in interface Angleoption - the AngleNorm identifier
Note: java.lang.Math trigonometric functions have precision problems with very large angle values. Therefore, angles of very large size should be normalized prior to passing their values to java.lang.Math trigonometric functions.
public void set(DecimalAngleUnit units,
double value)
DecimalAngle to the specified DecimalAngleUnits value.
set in interface Angleunits - the DecimalAngleUnits.value - the double value.public double get(DecimalAngleUnit units)
DecimalAngle in the specified DecimalAngleUnits.
get in interface Angleunits - the DecimalAngleUnits.
Angle.
public void add(DecimalAngleUnit units,
double value)
DecimalAngle the double value in the specified DecimalAngleUnits.
add in interface Angleunits - the DecimalAngleUnits.value - the double value.
public void set(SexagesimalAngleType type,
AngleSign sign,
double unitsValue)
DecimalAngle to the specified value in the SexagesimalAngleType.
set in interface Angletype - the SexagesimalAngleType.sign - the AngleSign.unitsValue - the double value of the primary units of the SexagesimalAngleType.
public void set(SexagesimalAngleType type,
AngleSign sign,
int unitsValue,
double minutes)
DecimalAngle to the specified value in the SexagesimalAngleType.
set in interface Angletype - the SexagesimalAngleType.sign - the AngleSign.unitsValue - the integer value of the primary units of the SexagesimalAngleType.minutes - the double value of the minutes sub-unit of the SexagesimalAngleType.
public void set(SexagesimalAngleType type,
AngleSign sign,
int unitsValue,
int minutes,
double seconds)
DecimalAngle to the specified value in the SexagesimalAngleType.
set in interface Angletype - the SexagesimalAngleType.sign - the AngleSign.unitsValue - the integer value of the primary units of the SexagesimalAngleType.minutes - the integer value of the minutes sub-unit of the SexagesimalAngleType.seconds - the double value of the seconds sub-unit of the SexagesimalAngleType.
public void set(SexagesimalAngleType type,
AngleSign sign,
int unitsValue,
int minutes,
int seconds,
int microseconds)
DecimalAngle to the specified value in the SexagesimalAngleType.
set in interface Angletype - the SexagesimalAngleType.sign - the AngleSign.unitsValue - the integer value of the primary units of the SexagesimalAngleType.minutes - the integer value of the minutes sub-unit of the SexagesimalAngleType.seconds - the integer value of the seconds sub-unit of the SexagesimalAngleType.microseconds - the integer value of the microseconds sub-unit of the
SexagesimalAngleType.
public void setValueInMicroseconds(SexagesimalAngleType type,
long value)
DecimalAngle to the specified value of microseconds of
the SexagesimalAngleType. (i.e. either in microseconds of
of degree or microseconds of hour)
setValueInMicroseconds in interface Angletype - the SexagesimalAngleType.value - the long value in microseconds to set for this Angle.public long getValueInMicroseconds(SexagesimalAngleType type)
DecimalAngle in units of microseconds of
the specified SexagesimalAngleType. (i.e. either in microseconds of
of degree or microseconds of hour)
getValueInMicroseconds in interface Angletype - the SexagesimalAngleType.
Angle in microseconds.
public void add(SexagesimalAngleUnit units,
int value)
DecimalAngle the value in the specified SexagesimalAngleUnits.
add in interface Angleunits - the SexagesimalAngleUnits.value - the integer value.public static final double normalizeDegrees(double degrees)
degrees - the double degrees value
Note: java.lang.Math trigonometric functions have precision problems with very large angle values. Therefore, angles of very large size should be normalized prior to passing their values to java.lang.Math trigonometric functions.
public static final double normalizeDegreesPositive(double degrees)
degrees - the double degrees value
Note: java.lang.Math trigonometric functions have precision problems with very large angle values. Therefore, angles of very large size should be normalized prior to passing their values to java.lang.Math trigonometric functions.
public static final double normalizeDegreesNegative(double degrees)
degrees - the double degrees value
Note: java.lang.Math trigonometric functions have precision problems with very large angle values. Therefore, angles of very large size should be normalized prior to passing their values to java.lang.Math trigonometric functions.
public static final double normalizeRadians(double radians)
radians - the double degrees value
Note: java.lang.Math trigonometric functions have precision problems with very large angle values. Therefore, angles of very large size should be normalized prior to passing their values to java.lang.Math trigonometric functions.
public static final double normalizeRadiansPositive(double radians)
radians - the double radian value
Note: java.lang.Math trigonometric functions have precision problems with very large angle values. Therefore, angles of very large size should be normalized prior to passing their values to java.lang.Math trigonometric functions.
public static final double normalizeRadiansNegative(double radians)
radians - the double radians value
Note: java.lang.Math trigonometric functions have precision problems with very large angle values. Therefore, angles of very large size should be normalized prior to passing their values to java.lang.Math trigonometric functions.
public java.lang.Object clone()
DecimalAngle object. Overrides Cloneable.
DecimalAngle object.public int hashCode()
public boolean equals(java.lang.Object obj)
Angles for equality. The result is true
if and only if the argument object is not null, is an Angle object
( including classes implementing Angle ) and represents an angle
of the same sign and magnitude as this Angle.
obj - the object to compare with
true if the Angles are the same;
false otherwise.public java.lang.String toString()
DecimalAngle in decimal degrees.
DecimalAnglepublic int compareTo(Angle that)
compareTo in interface Anglethat - the Angle to compare
public int compareTo(java.lang.Object obj)
compareTo in interface Angleobj - the Object to compare
ClassCastException - if the argument is not an
Angle.
|
Jeospace API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||