Add Types
parent
ccd12dc944
commit
29ba8f7e22
18
Types.md
Normal file
18
Types.md
Normal file
@ -0,0 +1,18 @@
|
||||
# Vector2
|
||||
|
||||
The most based type in the engine. Some people would say it doesnt have a point, but it really does make operations with positions and sizes way easier.
|
||||
|
||||
## Children
|
||||
Vector2 composes of X and Y, as easy as that.
|
||||
- `Vector2.x`
|
||||
- `Vector2.y`
|
||||
|
||||
## Functions
|
||||
But the type itself has functions to manupulate those x and y.
|
||||
|
||||
- `Vector2:Add(Vector2) -> Vector2` -- Add a Vector2 to Vector2. x1 + x2, y1 + y1
|
||||
- `Vector2:Mul(number) -> Vector2` -- Multiply a Vector2 by a certain number
|
||||
- `Vector2:Div(number) -> Vector2` -- Divide a Vector2 by a certain number
|
||||
- `Vector2:Negate() -> Vector2' -- Returns the negative version of this Vector2. -x, -y
|
||||
- `Vector2:Get() -> number, number` -- Returns x and y. local x, y = Vector2:Get()
|
||||
- `Vector2:Lerp(Vector2, number) -> Vector2` -- Returns a Lineally Interpolated Vector2 between those 2 Vector2's. Position = 0-1
|
Loading…
x
Reference in New Issue
Block a user