public class Position
extends java.lang.Object
Constructor and Description |
---|
Position(double x,
double y) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
double |
getDistance(Position other) |
double |
getDistanceSquared(Position other) |
double |
getX() |
double |
getY() |
int |
hashCode() |
double |
length() |
Position |
minus(Position other) |
Position |
multiply(double factor) |
Position |
normalized() |
Position |
plus(Position other) |
void |
setX(double x) |
void |
setY(double y) |
java.lang.String |
toString() |
public static final Position ORIGIN
public double getX()
public void setX(double x)
public double getY()
public void setY(double y)
public double getDistance(Position other)
public double getDistanceSquared(Position other)
public Position multiply(double factor)
public Position normalized()
public double length()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object