| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long |
| Access | Constructor and Description |
|---|---|
| public | Point2f(float
the x coordinate x, float the y coordinate y)Constructs and initializes a Point2f from the specified xy coordinates. |
| public | Point2f(float[]
the array of length 2 containing xy in order p)Constructs and initializes a Point2f from the specified array. |
| public | |
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final float | |
| public final float | distanceL1(Point2f
the other point p1)Computes the L-1 (Manhattan) distance between this point and point p1. |
| public final float | distanceLinf(Point2f
the other point p1)Computes the L-infinite distance between this point and point p1. |
| public final float | distanceSquared(Point2f
the other point p1)Computes the square of the distance between this point and point p1. |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| Point2f | back to summary |
|---|---|
| public Point2f(float x, float y) Constructs and initializes a Point2f from the specified xy coordinates.
| |
| Point2f | back to summary |
|---|---|
| public Point2f(float[] p) Constructs and initializes a Point2f from the specified array.
| |
| Point2f | back to summary |
|---|---|
| public Point2f(Point2f p1) Constructs and initializes a Point2f from the specified Point2f.
| |
| Point2f | back to summary |
|---|---|
| public Point2f(Point2d p1) Constructs and initializes a Point2f from the specified Point2d.
| |
| Point2f | back to summary |
|---|---|
| public Point2f(Tuple2d t1) Constructs and initializes a Point2f from the specified Tuple2d.
| |
| Point2f | back to summary |
|---|---|
| public Point2f(Tuple2f t1) Constructs and initializes a Point2f from the specified Tuple2f.
| |
| Point2f | back to summary |
|---|---|
| public Point2f() Constructs and initializes a Point2f to (0,0). | |
| distance | back to summary |
|---|---|
| public final float distance(Point2f p1) Computes the distance between this point and point p1.
| |
| distanceL1 | back to summary |
|---|---|
| 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 | back to summary |
|---|---|
| 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 | back to summary |
|---|---|
| public final float distanceSquared(Point2f p1) Computes the square of the distance between this point and point p1.
| |