|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmako5.math.Angle
public final class Angle
An angle in radians. Useful when dealing with polar coordinates, or determining the direction of vectors.
Field Summary | |
---|---|
static float |
HALF_PI
|
static float |
PI
|
static float |
TWO_PI
|
Constructor Summary | |
---|---|
Angle(float fRadians_)
Makes a new angle. |
Method Summary | |
---|---|
void |
add(Angle other_)
Adds another angle to this. |
void |
add(float value)
Adds to this angle. |
void |
addDegrees(float fAmount_)
Adds degrees to this. |
void |
addRadians(float fAmount_)
Adds radians to this. |
static Angle |
atan(float x,
float y)
Determines an angle by using atan |
Object |
clone()
Clones this angle |
float |
cos()
Returns the cosine of this in radians |
void |
flip()
Makes this angle equal -angle. |
static void |
glNegRotate(Angle rAngle_,
float x,
float y,
float z)
Performs an openGL rotation that is -angle. |
static void |
glRotate(Angle rAngle_,
float x,
float y,
float z)
Performs an openGL rotation based upon this angle. |
void |
setRadians(float f)
Sets the value of this angle in radians. |
float |
sin()
Returns the sine of this in radians. |
void |
sub(Angle other_)
Subtracts another angle from this. |
float |
tan()
Returns the tangent of this in radians |
float |
toDegrees()
Returns the measurement of this in radians. |
float |
toRadians()
Returns the measurement of this. |
String |
toString()
Returns "Angle: " + ..value.. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final float PI
public static final float TWO_PI
public static final float HALF_PI
Constructor Detail |
---|
public Angle(float fRadians_)
Method Detail |
---|
public Object clone()
clone
in class Object
public float toRadians()
public float toDegrees()
public void setRadians(float f)
public void add(Angle other_)
other_
- another anglepublic void add(float value)
value
- the amount to addpublic void addDegrees(float fAmount_)
public void addRadians(float fAmount_)
public void sub(Angle other_)
public void flip()
public float sin()
public float cos()
public float tan()
public String toString()
toString
in class Object
public static Angle atan(float x, float y)
public static void glRotate(Angle rAngle_, float x, float y, float z)
public static void glNegRotate(Angle rAngle_, float x, float y, float z)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |