public final class FPoint extends Object
Constructor and Description |
---|
FPoint(float x,
float y) |
FPoint(FPoint p) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(float x,
float y)
Returns true if the point's coordinates equal (x,y)
|
boolean |
equals(Object o) |
float |
getX() |
float |
getY() |
float |
length()
Return the euclidian distance from (0,0) to this point
|
static float |
length(float x,
float y)
Returns the euclidian distance from (0,0) to (x,y)
|
FPoint |
negate() |
FPoint |
offset(float dx,
float dy) |
String |
toString() |
public FPoint(float x, float y)
public FPoint(FPoint p)
public float getX()
public float getY()
public FPoint negate()
public FPoint offset(float dx, float dy)
dx
- the x-axis offsetdy
- the y-axis offsetpublic final boolean equals(float x, float y)
x
- the x value of the point that we want to comparey
- the y value of the point that we want to comparepublic final float length()
public static float length(float x, float y)
x
- the x value on which to compute the distancey
- the y value on which to compute the distance