public class PointReal2D
extends java.lang.Object
Constructor and Description |
---|
PointReal2D()
Constructs a point with the coordinates of (0, 0)
|
PointReal2D(double x,
double y)
Constructs a point witht he given coordinates
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
double |
getX()
Returns the horizontal coordinate of the point
|
double |
getY()
Returns the vertical coordinate of the point
|
int |
hashCode() |
void |
setX(double x)
Changes the horizontal coordinate of the point
|
void |
setY(double y)
Changes the vertical coordinate of the point
|
java.lang.String |
toString() |
public PointReal2D()
public PointReal2D(double x, double y)
x
- the horizontal coordinate of the pointy
- the vertical coordinate of the pointpublic double getX()
public void setX(double x)
x
- the new horizontal coordinate of the pointpublic double getY()
public void setY(double y)
y
- the vertical coordinate of the pointpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object