-
Notifications
You must be signed in to change notification settings - Fork 16
Point
Calvin Day edited this page Jul 6, 2021
·
3 revisions
The point
data structure is used to store two floats as an x, y
coordinate pair.
Point()
Point ScreenCoord = new Point();
Results in a Vector4
with the value of 0, 0
Vector4(float x, float y)
Point ScreenCoord = new Point(400, 600);
Results in a Point
with the value of 400, 600
setX(float x)
ScreenCoord.setX(53);
Sets the value of x
to 53
setY(float y)
ScreenCoord.setY(326);
Sets the value of y
to 326
getX()
ScreenCoord.getX();
Returns the value of x
getY()
ScreenCoord.getY();
Returns the value of y