|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.azalient.apo.basics.Angle
public class Angle
An angle object, with methods for angle arithmetic, conversion from degrees to radians, sine, cosine, etc.
The range of the angle can be set as (-180, 180] or [0, 360).
To instantiate this object from an angle value, use AngleDegrees.AngleDegrees(double) or AngleRadians.AngleRadians(double)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.azalient.api.a.position.IAngle |
|---|
IAngle.AngleRange |
| Field Summary | |
|---|---|
static Angle |
A0
|
static Angle |
A180
|
static Angle |
A270
|
static Angle |
A45
|
static Angle |
A90
|
static Angle |
ANEG90
|
static double |
DEG_180
|
static double |
DEG_360
|
static double |
DEG_45
|
static double |
DEG_90
|
static double |
DEG_COLINEAR
|
static double |
DEG_UTURN
|
static Angle |
EAST
|
static double |
HALFPI
|
static Angle |
NORTH
|
static double |
PI
|
static Angle |
SOUTH
|
static double |
TWOPI
|
static Angle |
WEST
|
static Angle |
ZERO
|
| Fields inherited from interface com.azalient.api.a.position.IAngle |
|---|
DEG135, DEG180, DEG270, DEG360, DEG45, DEG90 |
| Constructor Summary | |
|---|---|
Angle(IAngle that)
Create an angle as a duplicate of the given angle. |
|
| Method Summary | |
|---|---|
double |
cos()
Returns the cosine of the angle |
double |
degrees()
Returns the angle in degrees |
IAngle |
minus(IAngle that)
Subtract that angle from this one Returns the sum of the two angles, in a range according to the current range setting |
IAngle |
negative()
Returns a new angle, whose value is the negative of this one |
IAngle |
plus(IAngle that)
Add that angle to this one Returns the sum of the two angles, in a range according to the current range setting |
double |
radians()
Returns the angle value in radians, where PI radians = 180 |
IAngle |
range(IAngle.AngleRange angleRnge)
Returns this angle's value in the given range |
IAngle |
rangeN180_P180()
Returns this angle's value in the range (-180,180] |
IAngle |
rangeP0_P360()
Returns this angle's value in the range [0, 360) |
double |
sin()
Returns the sine of the angle |
double |
tan()
Returns the tangent of the angle |
String |
toString()
|
IXyz |
unitVectorXY()
The unit vector { sine(A), cosine(A), 0 } |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final double DEG_45
public static final double DEG_90
public static final double DEG_180
public static final double DEG_360
public static final double DEG_COLINEAR
public static final double DEG_UTURN
public static final double PI
public static final double TWOPI
public static final double HALFPI
public static final Angle ZERO
public static final Angle A0
public static final Angle A45
public static final Angle A90
public static final Angle ANEG90
public static final Angle A270
public static final Angle A180
public static final Angle NORTH
public static final Angle SOUTH
public static final Angle EAST
public static final Angle WEST
| Constructor Detail |
|---|
public Angle(IAngle that)
that - | Method Detail |
|---|
public double degrees()
IAngle
degrees in interface IAnglepublic double radians()
IAngle
radians in interface IAnglepublic double sin()
IAngle
sin in interface IAnglepublic double cos()
IAngle
cos in interface IAnglepublic double tan()
IAngle
tan in interface IAnglepublic IAngle negative()
IAngle
negative in interface IAnglepublic String toString()
toString in class Objectpublic IAngle range(IAngle.AngleRange angleRnge)
IAngle
range in interface IAnglepublic IAngle rangeN180_P180()
IAngle
rangeN180_P180 in interface IAnglepublic IAngle rangeP0_P360()
IAngle
rangeP0_P360 in interface IAnglepublic IAngle plus(IAngle that)
IAngle
plus in interface IAnglepublic IAngle minus(IAngle that)
IAngle
minus in interface IAnglepublic IXyz unitVectorXY()
IAngle
unitVectorXY in interface IAngle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||