|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.geom.Angle
public class Angle
Represents a geometric angle. Instances of Angle are immutable. An Angle can be obtained
through the factory methods fromDegrees and fromRadians.
| Field Summary | |
|---|---|
double |
degrees
|
static Angle |
NEG180
Represents an angle of negative 180 degrees |
static Angle |
NEG90
Represents a right angle of negative 90 degrees |
static Angle |
POS180
Represents an angle of positive 180 degrees |
static Angle |
POS360
Represents an angle of positive 360 degrees |
static Angle |
POS90
Represents a right angle of positive 90 degrees |
double |
radians
|
static Angle |
ZERO
Represents an angle of zero degrees |
| Constructor Summary | |
|---|---|
Angle(Angle angle)
|
|
| Method Summary | |
|---|---|
static Angle |
acos(double cosine)
|
Angle |
add(Angle angle)
Obtains the sum of these two Angles. |
Angle |
addDegrees(double degrees)
|
Angle |
addRadians(double radians)
|
Angle |
angularDistanceTo(Angle angle)
Computes the shortest distance between this and angle, as an
Angle. |
static Angle |
asin(double sine)
|
static Angle |
atan(double tan)
|
static Angle |
average(Angle a,
Angle b)
Obtains the average of three Angles. |
static Angle |
average(Angle a,
Angle b,
Angle c)
Obtains the average of three Angles. |
int |
compareTo(Angle angle)
Compares this Angle with angle for order. |
double |
cos()
Obtains the cosine of this Angle |
double |
cosHalfAngle()
|
static boolean |
crossesLongitudeBoundary(Angle angleA,
Angle angleB)
|
double |
divide(Angle angle)
Divides this Angle by another angle. |
Angle |
divide(double divisor)
Divides this Angle by divisor. |
boolean |
equals(Object o)
|
static Angle |
fromDegrees(double degrees)
Obtains an Angle from a specified number of degrees. |
static Angle |
fromDegreesLatitude(double degrees)
|
static Angle |
fromDegreesLongitude(double degrees)
|
static Angle |
fromRadians(double radians)
Obtains an Angle from a specified number of radians. |
static Angle |
fromRadiansLatitude(double radians)
|
static Angle |
fromRadiansLongitude(double radians)
|
static Angle |
fromXY(double x,
double y)
Obtains an Angle from rectangular coordinates. |
double |
getDegrees()
Retrieves the size of this Angle in degrees. |
double |
getRadians()
Retrieves the size of this Angle in radians. |
long |
getSizeInBytes()
Obtains the amount of memory this Angle consumes. |
int |
hashCode()
|
static Angle |
midAngle(Angle a1,
Angle a2)
Obtains the average of two Angles. |
static Angle |
mix(double amount,
Angle value1,
Angle value2)
Linearly interpolates between two angles. |
Angle |
multiply(double multiplier)
Multiplies this Angle by multiplier. |
Angle |
normalizedLatitude()
|
static Angle |
normalizedLatitude(Angle unnormalizedAngle)
|
Angle |
normalizedLongitude()
|
static Angle |
normalizedLongitude(Angle unnormalizedAngle)
|
double |
sin()
Obtains the sine of this Angle. |
double |
sinHalfAngle()
|
Angle |
subtract(Angle angle)
Obtains the difference of these two Angles. |
Angle |
subtractDegrees(double degrees)
|
Angle |
subtractRadians(double radians)
|
double |
tanHalfAngle()
Obtains the tangent of half of this Angle. |
String |
toString()
Obtains a String representation of this Angle. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final double degrees
public static final Angle NEG180
public static final Angle NEG90
public static final Angle POS180
public static final Angle POS360
public static final Angle POS90
public final double radians
public static final Angle ZERO
| Constructor Detail |
|---|
public Angle(Angle angle)
| Method Detail |
|---|
public static Angle acos(double cosine)
public final Angle add(Angle angle)
Angles. Does not accept a null argument. This method is commutative, so
a.add(b) and b.add(a) are equivalent. Neither this Angle nor
angle is changed, instead the result is returned as a new Angle.
angle - the Angle to add to this one.
Angle whose size is the total of this Angles and angles size
IllegalArgumentException - if angle is nullpublic final Angle addDegrees(double degrees)
public final Angle addRadians(double radians)
public Angle angularDistanceTo(Angle angle)
angle, as an
Angle.
angle - the Angle to measure angular distance to.
value.public static Angle asin(double sine)
public static Angle atan(double tan)
public static Angle average(Angle a,
Angle b)
Angles. The order of parameters does not matter.
a - the first Angleb - the second Angle
a1, a2 and a3
IllegalArgumentException - if a or b is null
public static Angle average(Angle a,
Angle b,
Angle c)
Angles. The order of parameters does not matter.
a - the first Angleb - the second Anglec - the third Angle
a1, a2 and a3
IllegalArgumentException - if a, b or c is nullpublic final int compareTo(Angle angle)
Angle with angle for order. Returns a negative integer if this is the
smaller Angle, a positive integer if this is the larger, and zero if both Angles are
equal.
compareTo in interface Comparable<Angle>angle - the Angle to compare against
Angle is smaller, 0 if both are equal and +1 if this Angle is
larger.
IllegalArgumentException - if angle is nullpublic final double cos()
Angle
Anglepublic final double cosHalfAngle()
public static boolean crossesLongitudeBoundary(Angle angleA,
Angle angleB)
public final double divide(Angle angle)
Angle by another angle. This Angle remains unchanged, instead the
resulting value in degrees is returned.
angle - the Angle by which to divide
Angle's degrees divided by angle's degrees
IllegalArgumentException - if angle is nullpublic final Angle divide(double divisor)
Angle by divisor. This Angle remains unchanged. The result is
returned as a new Angle. Behaviour is undefined if divisor equals zero.
divisor - the number to be divided by
Angle equivalent to this Angle divided by divisorpublic boolean equals(Object o)
equals in class Objectpublic static Angle fromDegrees(double degrees)
Angle from a specified number of degrees.
degrees - the size in degrees of the Angle to be obtained
Angle, whose size in degrees is given by degreespublic static Angle fromDegreesLatitude(double degrees)
public static Angle fromDegreesLongitude(double degrees)
public static Angle fromRadians(double radians)
Angle from a specified number of radians.
radians - the size in radians of the Angle to be obtained
Angle, whose size in radians is given by radianspublic static Angle fromRadiansLatitude(double radians)
public static Angle fromRadiansLongitude(double radians)
public static Angle fromXY(double x,
double y)
Angle from rectangular coordinates.
x - the abscissa coordinatey - the ordinate coordinate
Angle, whose size is determined from x and ypublic final double getDegrees()
Angle in degrees. This method may be faster than first obtaining the
radians and then converting to degrees.
Angle in degreespublic final double getRadians()
Angle in radians. This may be useful for java.lang.Math
functions, which generally take radians as trigonometric arguments. This method may be faster that first
obtaining the degrees and then converting to radians.
Angle in radians.public long getSizeInBytes()
Angle consumes.
Angle in bytes.public int hashCode()
hashCode in class Object
public static Angle midAngle(Angle a1,
Angle a2)
Angles. This method is commutative, so midAngle(m, n) and
midAngle(n, m) are equivalent.
a1 - the first Anglea2 - the second Angle
a1 and a2 throws IllegalArgumentException if either angle is
null
public static Angle mix(double amount,
Angle value1,
Angle value2)
amount - the interpolant.value1 - the first Angle.value2 - the second Angle.
Angle between value1 and value2.public final Angle multiply(double multiplier)
Angle by multiplier. This Angle remains unchanged. The
result is returned as a new Angle.
multiplier - a scalar by which this Angle is multiplied
Angle whose size equals this Angle's size multiplied by
multiplierpublic Angle normalizedLatitude()
public static Angle normalizedLatitude(Angle unnormalizedAngle)
public Angle normalizedLongitude()
public static Angle normalizedLongitude(Angle unnormalizedAngle)
public final double sin()
Angle.
Anglepublic final double sinHalfAngle()
public final Angle subtract(Angle angle)
Angles. Does not accept a null argument. This method is not
commutative. Neither this Angle nor angle is changed, instead the result is returned as
a new Angle.
angle - the Angle to subtract from this Angle
Angle correpsonding to this Angle's size minus angle's size
IllegalArgumentException - if angle is nullpublic final Angle subtractDegrees(double degrees)
public final Angle subtractRadians(double radians)
public final double tanHalfAngle()
Angle.
Anglepublic final String toString()
String representation of this Angle.
toString in class ObjectAngle in degrees and as a String
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||