Class vec2
Vector2.
menori.ml.vec2
Functions
vec2.dot (a, b) | dot |
vec2.distance (p0, p1) | distance |
vec2.fract (a) | fract |
vec2.lerp (a, b, s) | lerp |
vec2.min (a, b) | min |
vec2.max (a, b) | max |
vec2.abs (a) | abs |
vec2.equal (a, b) | equal |
vec2.notEqual (a, b) | notEqual |
vec2.lessThan (a, b) | lessThan |
vec2.lessThanEqual (a, b) | lessThanEqual |
vec2.greaterThan (a, b) | greaterThan |
vec2.greaterThanEqual (a, b) | greaterThanEqual |
vec2.pow (a, b) | pow |
Methods
vec2:clone () | clone |
vec2:set (x, y) | set |
vec2:add (a, b) | add |
vec2:sub (a, b) | sub |
vec2:mul (a, b) | mul |
vec2:div (a, b) | div |
vec2:scale (scalar) | scalar |
vec2:length () | length |
vec2:length2 () | length2 |
vec2:normalize () | normalize |
vec2:round () | round |
vec2:unpack () | unpack |
vec2:from_matrix_position (m) | from matrix position |
vec2:is_vec2 (a) | is vec2 |
Functions
- vec2.dot (a, b)
-
dot
Parameters:
- a
- b
- vec2.distance (p0, p1)
-
distance
Parameters:
- p0
- p1
- vec2.fract (a)
-
fract
Parameters:
- a
- vec2.lerp (a, b, s)
-
lerp
Parameters:
- a
- b
- s
- vec2.min (a, b)
-
min
Parameters:
- a
- b
- vec2.max (a, b)
-
max
Parameters:
- a
- b
- vec2.abs (a)
-
abs
Parameters:
- a
- vec2.equal (a, b)
-
equal
Parameters:
- a
- b
- vec2.notEqual (a, b)
-
notEqual
Parameters:
- a
- b
- vec2.lessThan (a, b)
-
lessThan
Parameters:
- a
- b
- vec2.lessThanEqual (a, b)
-
lessThanEqual
Parameters:
- a
- b
- vec2.greaterThan (a, b)
-
greaterThan
Parameters:
- a
- b
- vec2.greaterThanEqual (a, b)
-
greaterThanEqual
Parameters:
- a
- b
- vec2.pow (a, b)
-
pow
Parameters:
- a
- b
Methods
- vec2:clone ()
- clone
- vec2:set (x, y)
-
set
Parameters:
- x
- y
- vec2:add (a, b)
-
add
Parameters:
- a
- b
- vec2:sub (a, b)
-
sub
Parameters:
- a
- b
- vec2:mul (a, b)
-
mul
Parameters:
- a
- b
- vec2:div (a, b)
-
div
Parameters:
- a
- b
- vec2:scale (scalar)
-
scalar
Parameters:
- scalar
- vec2:length ()
- length
- vec2:length2 ()
- length2
- vec2:normalize ()
- normalize
- vec2:round ()
- round
- vec2:unpack ()
- unpack
- vec2:from_matrix_position (m)
-
from matrix position
Parameters:
- m
- vec2:is_vec2 (a)
-
is vec2
Parameters:
- a