javax.vecmath
public class Point2f extends Tuple2f implements Serializable
Constructor Summary | |
---|---|
Point2f(float x, float y)
Constructs and initializes a Point2f from the specified xy coordinates. | |
Point2f(float[] p)
Constructs and initializes a Point2f from the specified array. | |
Point2f(Point2f p1)
Constructs and initializes a Point2f from the specified Point2f. | |
Point2f(Point2d p1)
Constructs and initializes a Point2f from the specified Point2d. | |
Point2f(Tuple2f t1)
Constructs and initializes a Point2f from the specified Tuple2f. | |
Point2f(Tuple2d t1)
Constructs and initializes a Point2f from the specified Tuple2d. | |
Point2f()
Constructs and initializes a Point2f to (0,0). |
Method Summary | |
---|---|
float | distance(Point2f p1)
Computes the distance between this point and point p1. |
float | distanceL1(Point2f p1)
Computes the L-1 (Manhattan) distance between this point and point p1.
|
float | distanceLinf(Point2f p1)
Computes the L-infinite distance between this point and point p1.
|
float | distanceSquared(Point2f p1)
Computes the square of the distance between this point and point p1. |
Parameters: x the x coordinate y the y coordinate
Parameters: p the array of length 2 containing xy in order
Parameters: p1 the Point2f containing the initialization x y data
Parameters: p1 the Point2d containing the initialization x y data
Parameters: t1 the Tuple2f containing the initialization x y data
Parameters: t1 the Tuple2d containing the initialization x y data
Parameters: p1 the other point
Parameters: p1 the other point
Parameters: p1 the other point
Parameters: p1 the other point