Package com.massifmaps.core
Class ScreenPos
java.lang.Object
com.massifmaps.core.ScreenPos
A screen position defined by x,y floating point numbers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this object is equal to the specified object.floatgetX()Returns the x coordinate of this position.floatgetY()Returns the y coordinate of this position.inthashCode()Returns the hash value of this object.toString()Creates a string representation of this screen position, useful for logging.
-
Constructor Details
-
ScreenPos
public ScreenPos()Constructs a ScreenPos object. All coordinates will be 0. -
ScreenPos
public ScreenPos(float x, float y) Constructs a ScreenPos object from 2 coordinates.- Parameters:
x- The x coordinate.y- The y coordinate.
-
-
Method Details
-
equals
Checks if this object is equal to the specified object. -
hashCode
public int hashCode()Returns the hash value of this object. -
getX
public float getX()Returns the x coordinate of this position.- Returns:
- The x coordinate of this position.
-
getY
public float getY()Returns the y coordinate of this position.- Returns:
- The y coordinate of this position.
-
toString
Creates a string representation of this screen position, useful for logging.
-