public class Point2f extends Tuple2f implements Serializable
Constructor and Description |
---|
Point2f()
Constructs and initializes a Point2f to (0,0).
|
Point2f(float[] p)
Constructs and initializes a Point2f from the specified array.
|
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.
|
Modifier and Type | Method and Description |
---|---|
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, clone, epsilonEquals, equals, equals, get, getX, getY, hashCode, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, set, set, set, set, setX, setY, sub, sub, toString
public Point2f(float x, float y)
x
- the x coordinatey
- the y coordinatepublic Point2f(float[] p)
p
- the array of length 2 containing xy in orderpublic Point2f(Point2f p1)
p1
- the Point2f containing the initialization x y datapublic Point2f(Point2d p1)
p1
- the Point2d containing the initialization x y z datapublic Point2f(Tuple2d t1)
t1
- the Tuple2d containing the initialization x y z datapublic Point2f(Tuple2f t1)
t1
- the Tuple2f containing the initialization x y datapublic Point2f()
public final float distanceSquared(Point2f p1)
p1
- the other pointpublic final float distance(Point2f p1)
p1
- the other pointpublic final float distanceL1(Point2f p1)
p1
- the other pointpublic final float distanceLinf(Point2f p1)
p1
- the other pointCopyright © 2016–2022 SciJava. All rights reserved.