mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
add vec2.rotate
This commit is contained in:
parent
e064ace885
commit
77a340808e
3 changed files with 25 additions and 0 deletions
|
|
@ -177,6 +177,12 @@ vec2.angle(v: vec2)
|
|||
|
||||
-- returns the direction angle of the vector {x, y} in degrees [0, 360]
|
||||
vec2.angle(x: number, y: number)
|
||||
|
||||
-- returns the vector rotated by an angle in degrees counterclockwise
|
||||
vec2.rotate(v: vec2, angle: number) -> vec2
|
||||
|
||||
-- writes the vector rotated by an angle in degrees counterclockwise to dst
|
||||
vec2.rotate(v: vec2, angle: number, dst: vec2) -> vec2
|
||||
```
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue