javax.vecmath
Class Point2f
- Serializable
public class Point2f
implements Serializable
A 2 element point that is represented by single precision
floating point x,y coordinates.
specification 1.1, implementation $Revision: 1.10 $, $Date: 1999/10/05 07:03:50 $
Point2f() - Constructs and initializes a Point2f to (0,0).
|
Point2f(float x, float y) - Constructs and initializes a Point2f from the specified xy coordinates.
|
Point2f(Point2d p1) - Constructs and initializes a Point2f from the specified Point2d.
|
Point2f(Point2f p1) - Constructs and initializes a Point2f from the specified Point2f.
|
Point2f(Tuple2d t1) - Constructs and initializes a Point2f from the specified Tuple2d.
|
Point2f(Tuple2f t1) - Constructs and initializes a Point2f from the specified Tuple2f.
|
Point2f(p[] ) - Constructs and initializes a Point2f from the specified array.
|
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.
|
absolute , absolute , add , add , clamp , clamp , clampMax , clampMax , clampMin , clampMin , epsilonEquals , equals , equals , get , hashCode , interpolate , interpolate , negate , negate , scale , scale , scaleAdd , scaleAdd , set , set , set , set , sub , sub , toString |
Point2f
public Point2f()
Constructs and initializes a Point2f to (0,0).
Point2f
public Point2f(float x,
float y)
Constructs and initializes a Point2f from the specified xy coordinates.
x
- the x coordinatey
- the y coordinate
Point2f
public Point2f(Point2d p1)
Constructs and initializes a Point2f from the specified Point2d.
p1
- the Point2d containing the initialization x y data
Point2f
public Point2f(Point2f p1)
Constructs and initializes a Point2f from the specified Point2f.
p1
- the Point2f containing the initialization x y data
Point2f
public Point2f(Tuple2d t1)
Constructs and initializes a Point2f from the specified Tuple2d.
t1
- the Tuple2d containing the initialization x y data
Point2f
public Point2f(Tuple2f t1)
Constructs and initializes a Point2f from the specified Tuple2f.
t1
- the Tuple2f containing the initialization x y data
Point2f
public Point2f(p[] )
Constructs and initializes a Point2f from the specified array.
distance
public final float distance(Point2f p1)
Computes the distance between this point and point p1.
distanceL1
public final float distanceL1(Point2f p1)
Computes the L-1 (Manhattan) distance between this point and point p1.
The L-1 distance is equal to abs(x1-x2) + abs(y1-y2).
distanceLinf
public final float distanceLinf(Point2f p1)
Computes the L-infinite distance between this point and point p1.
The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].
distanceSquared
public final float distanceSquared(Point2f p1)
Computes the square of the distance between this point and point p1.