Vector2
A 2D vector.
Constructors
| Name | Arguments | Returns |
|---|---|---|
| Vector2.new | (x: number?, y: number?) | Vector2 |
Properties
| Name | Type |
|---|---|
| X | number |
| Y | number |
| Magnitude | number |
| Unit | Vector2 |
Methods
| Name | Arguments | Returns |
|---|---|---|
| Dot | (other: Vector2) | number |
| Cross | (other: Vector2) | number |
| Lerp | (goal: Vector2, alpha: number) | Vector2 |
| FuzzyEq | (other: Vector2, epsilon: number?) | boolean |
| Abs | () | Vector2 |
| Floor | () | Vector2 |
| Ceil | () | Vector2 |
| Min | (...: Vector2) | Vector2 |
| Max | (...: Vector2) | Vector2 |
Constants
| Name | Type |
|---|---|
| Vector2.zero | Vector2 |
| Vector2.one | Vector2 |
| Vector2.xAxis | Vector2 |
| Vector2.yAxis | Vector2 |
