Package quadbase.util
Class Point_2D
java.lang.Object
quadbase.util.Point_2D
- All Implemented Interfaces:
Cloneable
This class contains methods to define and manipulate a 2D Point. The coordinates of the point are
floating point numbers and can represent a relative position in the main chart window.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the two points are the same or not.floatgetX()Get value of x.floatgetY()Get value of y.inthashCode()Returns the hash code for the object.voidSet the values based on the given point.voidsetX(float f) Set value of x.voidsetY(float f) Set value of y.toString()Returns the string representation of a 3D point
-
Field Details
-
x
public float xThe x, y coordinates. -
y
public float yThe x, y coordinates.
-
-
Constructor Details
-
Point_2D
public Point_2D()Null constructor -
Point_2D
public Point_2D(float _x, float _y) Constructor based on values -
Point_2D
Copy Constructor based on values
-
-
Method Details
-
toString
Returns the string representation of a 3D point -
equals
Checks if the two points are the same or not. -
hashCode
public int hashCode()Returns the hash code for the object. -
getX
public float getX()Get value of x.- Returns:
- value of x
-
getY
public float getY()Get value of y.- Returns:
- value of y
-
setX
public void setX(float f) Set value of x.- Parameters:
f- The x coordinate.
-
setY
public void setY(float f) Set value of y.- Parameters:
f- The y coordinate.
-
set
Set the values based on the given point.- Parameters:
p- The input Point_2D object.
-