public class Point2F
extends java.lang.Object
| Constructor and Description |
|---|
Point2F(float x,
float y) |
| Modifier and Type | Method and Description |
|---|---|
Point2F |
add(float value)
Add the given value to the point.
|
Point2F |
add(float x,
float y)
Add the given values to the point.
|
Point2F |
add(Point2F point)
Add the values of the given point to this point.
|
double |
distance(float x,
float y)
Calculate the distance between this point and the given point.
|
double |
distance(Point2F point)
Calculate the distance between this point and the given point.
|
double |
distanceSquared(float x,
float y)
Calculate the square distance between this point and the given point.
|
double |
distanceSquared(Point2F point)
Calculate the square distance between this point and the given point.
|
Point2F |
divide(float value)
Divide the point by the given value.
|
Point2F |
divide(float x,
float y)
Divide the point by the given values.
|
Point2F |
divide(Point2F point)
Divide this point by the values of the given point.
|
float |
getX() |
float |
getY() |
Point2F |
multiply(float value)
Multiply the point with the given value.
|
Point2F |
multiply(float x,
float y)
Multiply the point with the given values.
|
Point2F |
multiply(Point2F point)
Multiply the values of the given point with this point.
|
Point2F |
subtract(float value)
Subtract the given value from the point.
|
Point2F |
subtract(float x,
float y)
Subtract the given values from the point.
|
Point2F |
subtract(Point2F point)
Subtract the values of the given point from this point.
|
public float getX()
public float getY()
public Point2F add(float value)
value - The value to addpublic Point2F add(float x, float y)
x - The x value to addy - The y value to addpublic Point2F add(Point2F point)
point - The point to addpublic Point2F subtract(float value)
value - The value to subtractpublic Point2F subtract(float x, float y)
x - The x value to subtracty - The y value to subtractpublic Point2F subtract(Point2F point)
point - The point to subtractpublic Point2F multiply(float value)
value - The value to multiplypublic Point2F multiply(float x, float y)
x - The x value to multiplyy - The y value to multiplypublic Point2F multiply(Point2F point)
point - The point to multiplypublic Point2F divide(float value)
value - The value to dividepublic Point2F divide(float x, float y)
x - The x value to dividey - The y value to dividepublic Point2F divide(Point2F point)
point - The point to dividepublic double distanceSquared(float x,
float y)
x - The x coordinate of the pointy - The y coordinate of the pointpublic double distanceSquared(Point2F point)
point - The point to calculate the distance topublic double distance(float x,
float y)
x - The x coordinate of the pointy - The y coordinate of the pointpublic double distance(Point2F point)
point - The point to calculate the distance to