Package org.seamcat.model.geometry
Class Point2D
- java.lang.Object
-
- org.seamcat.model.geometry.Point2D
-
public class Point2D extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static Point2D
ORIGIN
static java.util.Comparator<Point2D>
X_COMPARATOR
static java.util.Comparator<Point2D>
Y_COMPARATOR
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Point2D
add(double x, double y)
Point2D
add(Point2D other)
boolean
equals(java.lang.Object obj)
double
getX()
double
getY()
int
hashCode()
Point2D
scale(double factor)
Point2D
subtract(double x, double y)
Point2D
subtract(Point2D other)
java.lang.String
toString()
Point2D
translate(Vector2D v)
-
-
-
Constructor Detail
-
Point2D
public Point2D()
-
Point2D
public Point2D(double x, double y)
-
Point2D
public Point2D(Point2D p)
-
-
Method Detail
-
getX
public double getX()
-
getY
public double getY()
-
add
public Point2D add(double x, double y)
-
subtract
public Point2D subtract(double x, double y)
-
scale
public Point2D scale(double factor)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-