Structs
vec3

vec3

Members

  • x: number
  • y: number
  • z: number

Operators

+

-

*

/

Functions

length

ArgumentTypeRequired
returnsnumber
vec:length()

length2d

ArgumentTypeRequired
returnsnumber
vec:length2d()

dist_to

ArgumentTypeRequired
othervec3+
returnsnumber
vec3.new(1, 1):dist_to(vec3.new(2, 2))

dot

ArgumentTypeRequired
othervec3+
returnsnumber
vec:dot(other)

cross

ArgumentTypeRequired
othervec3+
returnsnumber
vec:cross(other)

normalized

ArgumentTypeRequired
returnsvec3
vec:normalized()

angle_between

ArgumentTypeRequired
othervec3+
returnsnumber
vec:angle_between(other)

rotated

ArgumentTypeRequired
anglenumber+
returnsvec3
vec:rotated(angle)

extend

ArgumentTypeRequired
tovec3+
distancenumber+
returnsvec3
vec:extend(to, distance)

to_screen

Get position on screen

ArgumentTypeRequired
returnsvec2 | nil
vec:to_screen()

to_minimap

Get position on minimap

ArgumentTypeRequired
returnsvec2 | nil
vec:to_minimap()