public class DoublePoint2dImpl extends AbstractPoint2d
Modifier and Type | Field and Description |
---|---|
double |
x
the x ordinate
|
double |
y
the y ordinate
|
Constructor and Description |
---|
DoublePoint2dImpl()
Default constructor - point at origin
|
DoublePoint2dImpl(double x,
double y)
Construct with given ordinates
|
DoublePoint2dImpl(Point2d pt)
Construct with given coordinate
|
Modifier and Type | Method and Description |
---|---|
Point2d |
copy()
Clone the point
|
Number |
getOrdinate(int dimension)
Get the ordinate value for a specific dimension.
|
void |
setOrdinate(int dimension,
Number value)
Set the ordinate value for a specific dimension.
|
asciiHeader, binaryHeader, copyFrom, equals, getDimensions, getX, getY, hashCode, minus, readASCII, readBinary, setX, setY, transform, translate, translate, writeASCII, writeBinary
public DoublePoint2dImpl()
public DoublePoint2dImpl(double x, double y)
x
- the x ordinatey
- the y ordinatepublic DoublePoint2dImpl(Point2d pt)
pt
- the coordinatepublic Point2d copy()
Point2d
public Number getOrdinate(int dimension)
Coordinate
dimension
- The index of the dimension we are interested inpublic void setOrdinate(int dimension, Number value)
Coordinate
dimension
- The index of the dimension we are interested invalue
- The value of the ordinate of the given dimension.