|
MATES 3.0-rc2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mates.util.Position
org.mates.util.Position2D
Class for storing a position in Euclidean space.
| Constructor Summary | |
Position2D(double x,
double y)
Creates a new Position object. |
|
| Method Summary | |
java.lang.Object |
clone()
|
double |
distanceTo(Position position)
Returns the distance from this position to position (i.e. |
double |
getX()
Returns the x coordinate of this position. |
double |
getY()
Returns the y coordinate of this position. |
void |
setX(double newx)
Sets the x coordinate of this position. |
void |
setY(double newy)
Sets the y coordinate of this position. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Position2D(double x,
double y)
| Method Detail |
public double getX()
x coordinate of this position.
public double getY()
y coordinate of this position.
public void setX(double newx)
x coordinate of this position.
public void setY(double newy)
y coordinate of this position.
public double distanceTo(Position position)
position (i.e. the L2-Norm of the
positions). The argument is expected to be another instance of
Position2D.
distanceTo in class Positionjava.lang.IllegalArgumentException - if position is
not an instance of Position2D.public java.lang.Object clone()
clone in class Positionpublic java.lang.String toString()
|
MATES 3.0-rc2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||