com.azalient.api.a.position
Interface IAngle

All Known Implementing Classes:
Angle, AngleDegrees, AngleRadians

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

DEG45

static final double DEG45
Constant for 45 degrees

See Also:
Constant Field Values

DEG90

static final double DEG90
Constant for 90 degrees

See Also:
Constant Field Values

DEG135

static final double DEG135
Constant for 135 degrees

See Also:
Constant Field Values

DEG180

static final double DEG180
Constant for 180 degrees

See Also:
Constant Field Values

DEG270

static final double DEG270
Constant for 270 degrees

See Also:
Constant Field Values

DEG360

static final double DEG360
Constant for 360 degrees

See Also:
Constant Field Values
Method Detail

degrees

double degrees()
Returns the angle in degrees


radians

double radians()
Returns the angle value in radians, where PI radians = 180


sin

double sin()
Returns the sine of the angle


cos

double cos()
Returns the cosine of the angle


tan

double tan()
Returns the tangent of the angle


plus

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


minus

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


negative

IAngle negative()
Returns a new angle, whose value is the negative of this one


range

IAngle range(IAngle.AngleRange r)
Returns this angle's value in the given range


rangeN180_P180

IAngle rangeN180_P180()
Returns this angle's value in the range (-180,180]


rangeP0_P360

IAngle rangeP0_P360()
Returns this angle's value in the range [0, 360)


unitVectorXY

IXyz unitVectorXY()
The unit vector { sine(A), cosine(A), 0 }