public final class Coordinate extends Object
Not a geometry, to be used as primitive in geometries.
Constructor and Description |
---|
Coordinate()
Constructs a coordinate with default values for
x , y , and z using 0. |
Coordinate(double x,
double y)
Constructs a coordinate with the provide values for
x , y , and z . |
Coordinate(double x,
double y,
double z)
Constructs a coordinate with the provide values for
x , y , and z . |
Modifier and Type | Method and Description |
---|---|
Coordinate |
add(Coordinate other) |
Coordinate |
divide(double factor) |
boolean |
equals(Object other) |
double |
getX()
The x value of the coordinate.
|
double |
getY()
The y value of the coordinate.
|
double |
getZ()
The z value of the coordinate.
|
int |
hashCode()
Returns the hash for this coordinate.
|
Coordinate |
multiply(double factor) |
Coordinate |
subtract(Coordinate other) |
String |
toString() |
public Coordinate()
x
, y
, and z
using 0.public Coordinate(double x, double y)
x
, y
, and z
.x
- the x value of the coordinate.y
- the y value of the coordinate.public Coordinate(double x, double y, double z)
x
, y
, and z
.x
- the x value of the coordinate.y
- the y value of the coordinate.z
- the z value of the coordinate.public double getX()
public double getY()
public double getZ()
public int hashCode()
@NotNull public Coordinate add(@NotNull Coordinate other)
@NotNull public Coordinate subtract(@NotNull Coordinate other)
@NotNull public Coordinate multiply(double factor)
@NotNull public Coordinate divide(double factor)