public final class Angle extends Object
Instances of this class are immutable. All change operations
return a new instance of this Angle class.
| Modifier and Type | Field and Description |
|---|---|
static Angle |
ZERO
The
Angle corresponding to the 0 angle. |
| Constructor and Description |
|---|
Angle()
Instantiates an
Angle of 0°. |
Angle(Angle source)
Deprecated.
Angle is immutable, so there is no need to copy an instance.
|
Angle(double dDegrees)
Instantiates an
Angle from the given double value. |
Angle(int nDegrees)
Instantiates an
Angle from the given int value. |
Angle(int value,
boolean isResolved)
Instantiates an
Angle from the given int value. |
Angle(long nDegrees)
Instantiates an
Angle from the given long value. |
| Modifier and Type | Method and Description |
|---|---|
Angle |
add(Angle oAdd)
Returns an
Angle representing the
addition of this object and the given Angle. |
int |
degrees()
Gets this object's angle value.
|
boolean |
equals(Object object)
Determines if this object is equal to the given Object.
|
double |
getAngle()
Gets this object's angle value.
|
boolean |
gt(Angle compare)
Determines if this object is greater than the given
Angle. |
boolean |
gte(Angle compare)
Determines if this object is greater than or equal to the given
Angle. |
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
lt(Angle compare)
Determines if this object is less than the given
Angle. |
boolean |
lte(Angle compare)
Determines if this object is less than or equal to the given
Angle. |
Angle |
subtract(Angle subtract)
Returns an
Angle representing the
subtraction of this object and the given Angle. |
String |
toString()
Returns a string representation of this object.
|
static Angle |
zero()
The zero angle.
|
public static final Angle ZERO
Angle corresponding to the 0 angle.public Angle()
Angle of 0°.public Angle(Angle source)
Angle from the
given Angle.source - the Angle to copy to this object.public Angle(double dDegrees)
Angle from the given double value.
Angle values are expressed in degrees: e.g., 15.5 means 15
and 1/2 degrees, not 15 degrees and 50 minutes.dDegrees - the degree of the angle.public Angle(int nDegrees)
Angle from the given int value.nDegrees - the degree of the angle.public Angle(long nDegrees)
Angle from the given long value.nDegrees - the degree of the angle.public Angle(int value,
boolean isResolved)
Angle from the given int value.value - the value of the angle.isResolved - when true, interpret the angle value as in unit
of internal resolution; when false, interpret
the angle value as a degree.public Angle add(Angle oAdd)
Angle representing the
addition of this object and the given Angle.oAdd - the Angle to subtract.public int degrees()
public boolean equals(Object object)
public int hashCode()
public double getAngle()
public boolean gt(Angle compare)
Angle.compare - the Angle to compare.public boolean gte(Angle compare)
Angle.compare - the Angle to compare.public boolean lt(Angle compare)
Angle.compare - the Angle to compare.public boolean lte(Angle compare)
Angle.compare - the Angle to compare.public Angle subtract(Angle subtract)
Angle representing the
subtraction of this object and the given Angle.subtract - the Angle to subtract.public String toString()
public static Angle zero()
Copyright © 2010 - 2020 Adobe. All Rights Reserved