public class Point2d
extends java.lang.Object
Constructor and Description |
---|
Point2d()
Construct with empty values.
|
Point2d(double x,
double y)
Construct from two values.
|
Point2d(Point2d that)
Construct from an existing Point2d
|
Modifier and Type | Method and Description |
---|---|
Point2d |
addTo(Point2d that) |
boolean |
equals(java.lang.Object obj) |
void |
finalize() |
static Point2d |
FromDegrees(double lon,
double lat)
Create a Point2D geo coordinate from degrees.
|
double |
getX()
Return the X value.
|
double |
getY()
Return the Y value.
|
Point2d |
multiplyBy(double t) |
void |
setValue(double x,
double y)
Set the value of the point.
|
double |
squaredNorm()
Returns the squared norm (dx*dx + dy*dy)
|
Point2d |
toDegrees()
Points are normally stored as radians, if they're positions on the globe or map.
|
java.lang.String |
toString() |
public Point2d()
public Point2d(Point2d that)
public Point2d(double x, double y)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public Point2d multiplyBy(double t)
public static Point2d FromDegrees(double lon, double lat)
lon
- Longitude first in degrees.lat
- Then latitude in degrees.public double squaredNorm()
public Point2d toDegrees()
public void finalize()
finalize
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public double getX()
public double getY()
public void setValue(double x, double y)