Package eu.woolplatform.utils.geom
Class Point
- java.lang.Object
-
- eu.woolplatform.utils.geom.Point
-
public class Point extends Object
This class defines a point.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)doublegetX()Returns the X position.doublegetY()Returns the Y position.inthashCode()voidoffset(double dx, double dy)Moves this point by the specified offset.voidset(double x, double y)Sets the X and Y position.StringtoString()
-
-
-
Constructor Detail
-
Point
public Point(double x, double y)Constructs a new point.- Parameters:
x- the X positiony- the Y position
-
Point
public Point(Point other)
Constructs a copy of another point.- Parameters:
other- the other point
-
-
Method Detail
-
getX
public double getX()
Returns the X position.- Returns:
- the X position
-
getY
public double getY()
Returns the Y position.- Returns:
- the Y position
-
set
public void set(double x, double y)Sets the X and Y position.- Parameters:
x- the X positiony- the Y position
-
offset
public void offset(double dx, double dy)Moves this point by the specified offset.- Parameters:
dx- the offset along the X axisdy- the offset along the Y axis
-
-