vec3
Members
x:
number
y:
number
z:
number
Operators
+
-
*
/
Functions
length
Argument | Type | Required |
---|---|---|
returns | number |
vec:length()
length2d
Argument | Type | Required |
---|---|---|
returns | number |
vec:length2d()
dist_to
Argument | Type | Required |
---|---|---|
other | vec3 | + |
returns | number |
vec3.new(1, 1):dist_to(vec3.new(2, 2))
dot
Argument | Type | Required |
---|---|---|
other | vec3 | + |
returns | number |
vec:dot(other)
cross
Argument | Type | Required |
---|---|---|
other | vec3 | + |
returns | number |
vec:cross(other)
normalized
Argument | Type | Required |
---|---|---|
returns | vec3 |
vec:normalized()
angle_between
Argument | Type | Required |
---|---|---|
other | vec3 | + |
returns | number |
vec:angle_between(other)
rotated
Argument | Type | Required |
---|---|---|
angle | number | + |
returns | vec3 |
vec:rotated(angle)
extend
Argument | Type | Required |
---|---|---|
to | vec3 | + |
distance | number | + |
returns | vec3 |
vec:extend(to, distance)
to_screen
Get position on screen
Argument | Type | Required |
---|---|---|
returns | vec2 | nil |
vec:to_screen()
to_minimap
Get position on minimap
Argument | Type | Required |
---|---|---|
returns | vec2 | nil |
vec:to_minimap()