public class Point_2D
extends java.lang.Object
implements java.lang.Cloneable
IAnnotation
,
IReferenceObj
Modifier and Type | Field and Description |
---|---|
float |
x
The x, y coordinates.
|
float |
y
The x, y coordinates.
|
Constructor and Description |
---|
Point_2D()
Null constructor
|
Point_2D(float _x,
float _y)
Constructor based on values
|
Point_2D(Point_2D p)
Copy Constructor based on values
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Checks if the two points are the same or not.
|
float |
getX()
Get value of x.
|
float |
getY()
Get value of y.
|
int |
hashCode()
Returns the hash code for the object.
|
void |
set(Point_2D p)
Set the values based on the given point.
|
void |
setX(float f)
Set value of x.
|
void |
setY(float f)
Set value of y.
|
java.lang.String |
toString()
Returns the string representation of a 3D point
|
public Point_2D()
public Point_2D(float _x, float _y)
public Point_2D(Point_2D p)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public float getX()
public float getY()
public void setX(float f)
f
- The x coordinate.public void setY(float f)
f
- The y coordinate.public void set(Point_2D p)
p
- The input Point_2D object.