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