Vector2
The Vector2 class represents a 2D vector or position in the game world. It also contains useful methods for vector arithmetic and comparisons.
Constructor
public Vector2(float x, float y)
Fields
x
float
The x component of the vector.
y
float
The y component of the vector.
Methods
public Vector2 add(Vector2 other)
Returns a new Vector2 that is the sum of this vector and the other vector.
public boolean equals(Object other)
Check if this Vector2 is equal to another Vector2 (by x=x and y=y).
ByteBrawl
0