Vector2

This component contains two points x and y

Component Author: Jabo Release Date: April 11, 2020

Usage
Methods
Usage
new Vector2(float x, float y);
Methods
static distance(Vector2 v1, Vector2 v2); // Returns the distance between two vector
// Vector2 Math
add(Vector2 vec); // Add to another vector
subtract(Vector2 vec); // Add to another vector
multiply(Vector2 vec); // Add to another vector
divide(Vector2 vec); // Add to another vector
// Math
addX(float n); // Add n to Vector2's X
subtractX(float n); // Subtract n to Vector2's X
addY(float n); // Add n to Vector2's Y
subtractY(float n); // Subtract n to Vector2's Y
// Misc
moveTowards(Vector2 target, float speed); // Move towards a Vector2
setX(float x); // Change x
setY(float y); // Change y
getX(); // Returns float
getY(); // Returns float