Vector2 - CreedVI/Raylib-J GitHub Wiki
The Vector2
data structure is used to store two floats as an x, y
coordinate pair.
Constructors
Vector2()
Vector2 position = new Vector2();
Results in a Vector2
with the value of 0, 0
Vector2(float x, float y)
Vector2 position = new Vector2(55, 67.4f);
Results in a Vector2
with the value of 55, 67.4f
Methods
setX(float x)
position.setX(53);
Sets the value of x
to 53
setY(float y)
position.setY(326);
Sets the value of y
to 326
getX()
position.getX();
Returns the value of x
getY()
position.getY();
Returns the value of y