Class Vec2
A x y coordinate
Functions
| Vec2.new (x, y) | Creates a new Vector2. |
Fields
| Vec2.x | The x of the Vector |
| Vec2.y | The y of the Vector |
Methods
| Vec2:add (adds) | Adds 2 Vec2s. |
| Vec2:mul (scalar) | Multiplies a Vec2 by a scalar. |
Functions
Methods- Vec2.new (x, y)
-
Creates a new Vector2.
Parameters:
- x float the x position
- y float the y position
Returns:
-
Vec2
the new Vector