public class Angle extends Object implements Comparable<Angle>, Serializable
Latitude
,
Longitude
,
AngleFormat
,
Serialized FormConstructor and Description |
---|
Angle(double theta)
Contructs a new angle with the specified value.
|
Angle(String string)
Constructs a newly allocated
Angle object that represents the angle value represented
by the string. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Angle that)
Compares two
Angle objects numerically. |
double |
degrees()
Returns the angle value in degrees.
|
boolean |
equals(Object object)
Compares the specified object with this angle for equality.
|
int |
hashCode()
Returns a hash code for this
Angle object. |
double |
radians()
Returns the angle value in radians.
|
String |
toString()
Returns a string representation of this
Angle object. |
public Angle(double theta)
theta
- Angle in degrees.public Angle(String string) throws NumberFormatException
Angle
object that represents the angle value represented
by the string. The string should represents an angle in either fractional degrees (e.g.
45.5°) or degrees with minutes and seconds (e.g. 45°30').string
- A string to be converted to an Angle
.NumberFormatException
- if the string does not contain a parsable angle.public double degrees()
public double radians()
public int hashCode()
Angle
object.public boolean equals(Object object)
public int compareTo(Angle that)
Angle
objects numerically. The comparaison is done as if by the Double.compare(double,double)
method.compareTo
in interface Comparable<Angle>
Copyright © 1996–2019 Geotools. All rights reserved.