Vec
verb.core.Vec
CLASS
Tools for working with matrices
angleBetween
STATIC METHOD
angleBetween(a : Array<Float>, b : Array<Float>) : Float
positiveAngleBetween
STATIC METHOD
positiveAngleBetween(a : Array<Float>, b : Array<Float>, n : Array<Float>) : Float
signedAngleBetween
STATIC METHOD
signedAngleBetween(a : Array<Float>, b : Array<Float>, n : Array<Float>) : Float
angleBetweenNormalized2d
STATIC METHOD
angleBetweenNormalized2d(a : Array<Float>, b : Array<Float>) : Float
domain
STATIC METHOD
domain(a : Array<Float>) : Float
range
STATIC METHOD
range(max : Int) : Array<Float>
span
STATIC METHOD
span(min : Float, max : Float, step : Float) : Array<Float>
neg
STATIC METHOD
neg(arr : Array<Float>) : Array<Float>
min
STATIC METHOD
min(arr : Array<Float>) : Float
max
STATIC METHOD
max(arr : Array<Float>) : Float
all
STATIC METHOD
all(arr : Array<Bool>) : Bool
finite
STATIC METHOD
finite(arr : Array<Float>) : Array<Bool>
onRay
STATIC METHOD
onRay(origin : Point, dir : Vector, u : Float) : Array<Float>
lerp
STATIC METHOD
lerp(i : Float, u : Array<Float>, v : Array<Float>) : Array<Float>
normalized
STATIC METHOD
normalized(arr : Array<Float>)
cross
STATIC METHOD
cross(u : Array<Float>, v : Array<Float>) : Array<Float>
dist
STATIC METHOD
dist(a : Array<Float>, b : Array<Float>) : Float
distSquared
STATIC METHOD
distSquared(a : Array<Float>, b : Array<Float>) : Float
sum
STATIC METHOD
sum(a : Iterable<Float>) : Float
addAll
STATIC METHOD
addAll(a : Iterable<Array<Float>>) : Array<Float>
addAllMutate
STATIC METHOD
addAllMutate(a : Array<Array<Float>>)
addMulMutate
STATIC METHOD
addMulMutate(a : Array<Float>, s : Float, b : Array<Float>)
subMulMutate
STATIC METHOD
subMulMutate(a : Array<Float>, s : Float, b : Array<Float>)
addMutate
STATIC METHOD
addMutate(a : Array<Float>, b : Array<Float>)
subMutate
STATIC METHOD
subMutate(a : Array<Float>, b : Array<Float>)
mulMutate
STATIC METHOD
mulMutate(a : Float, b : Array<Float>)
norm
STATIC METHOD
norm(a : Iterable<Float>) : Float
normSquared
STATIC METHOD
normSquared(a : Iterable<Float>) : Float
rep
STATIC METHOD
rep<T>(num : Int, ele : T) : Array<T>
zeros1d
STATIC METHOD
zeros1d(rows : Int) : Array<Float>
zeros2d
STATIC METHOD
zeros2d(rows : Int, cols : Int) : Array<Array<Float>>
zeros3d
STATIC METHOD
zeros3d(rows : Int, cols : Int, depth : Int) : Array<Array<Array<Float>>>
dot
STATIC METHOD
dot(a : Array<Float>, b : Array<Float>) : Float
add
STATIC METHOD
add(a : Array<Float>, b : Array<Float>) : Array<Float>
mul
STATIC METHOD
mul(a : Float, b : Array<Float>) : Array<Float>
div
STATIC METHOD
div(a : Array<Float>, b : Float) : Array<Float>
sub
STATIC METHOD
sub(a : Array<Float>, b : Array<Float>) : Array<Float>
isZero
STATIC METHOD
isZero(vec : Array<Float>)
sortedSetUnion
STATIC METHOD
sortedSetUnion(a : Array<Float>, b : Array<Float>) : Array<Float>
sortedSetSub
STATIC METHOD
sortedSetSub(a : Array<Float>, b : Array<Float>) : Array<Float>
a is superset, hence it is always longer or equal