|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IAngle
This object holds an angle value, and can be used for angle arithmetic (adding, subtracting) and for access to trigonometry functions, such as sine, cosine, tangent. The angle value can be retrieved as degrees or radians.
| Nested Class Summary | |
|---|---|
static class |
IAngle.AngleRange
An angle object can be set to have values of (-180 to +180] or [0 to +360). |
| Field Summary | |
|---|---|
static double |
DEG135
Constant for 135 degrees |
static double |
DEG180
Constant for 180 degrees |
static double |
DEG270
Constant for 270 degrees |
static double |
DEG360
Constant for 360 degrees |
static double |
DEG45
Constant for 45 degrees |
static double |
DEG90
Constant for 90 degrees |
| 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 r)
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 |
IXyz |
unitVectorXY()
The unit vector { sine(A), cosine(A), 0 } |
| Field Detail |
|---|
static final double DEG45
static final double DEG90
static final double DEG135
static final double DEG180
static final double DEG270
static final double DEG360
| Method Detail |
|---|
double degrees()
double radians()
double sin()
double cos()
double tan()
IAngle plus(IAngle that)
IAngle minus(IAngle that)
IAngle negative()
IAngle range(IAngle.AngleRange r)
IAngle rangeN180_P180()
IAngle rangeP0_P360()
IXyz unitVectorXY()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||