public class Point extends Object
Constructor and Description |
---|
Point(double... coordinates)
Create a point with given coordinates.
|
Point(Vector coordinates)
Create a point with given coordinates.
|
Modifier and Type | Method and Description |
---|---|
int |
dimension()
Get the dimension of the coordinate space.
|
double |
distance(Point pt)
Compute the Euclidean distance between this point and the given point.
|
ImmutableVector |
getCoordinates()
Get the coordinates of the point.
|
public Point(double... coordinates)
coordinates
- the coordinates of the pointpublic Point(Vector coordinates)
coordinates
- the coordinates of the pointpublic ImmutableVector getCoordinates()
public int dimension()
public double distance(Point pt)
pt
- another pointCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.