|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.simulation.Direction
public class Direction
Direction. Represents an angular direction. It provides some useful static methods involving directions.
Constructor Summary | |
---|---|
Direction(double direction)
Constructs a Direction object 0 = North, clockwise |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clones this Direction object |
boolean |
equals(java.lang.Object obj)
Returns true if object is an equal direction |
double |
getCosDirection()
Returns the cosine of the direction |
double |
getDirection()
Returns direction in radians 0 = North, clockwise |
double |
getSinDirection()
Returns the sine of the direction |
int |
hashCode()
Gets the hash code for this object. |
void |
setDirection(double direction)
Sets the direction 0 = North, clockwise |
java.lang.String |
toString()
Gets the string value of the object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Direction(double direction)
direction
- direction in radiansMethod Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- an Object instance
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public double getDirection()
public void setDirection(double direction)
direction
- new directionpublic double getSinDirection()
public double getCosDirection()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |