Vec

verb.core.Vec

CLASS

Source code

Tools for working with matrices

angleBetween

STATIC METHOD

Source code

angleBetween(a : Array<Float>, b : Array<Float>) : Float

positiveAngleBetween

STATIC METHOD

Source code

positiveAngleBetween(a : Array<Float>, b : Array<Float>, n : Array<Float>) : Float

signedAngleBetween

STATIC METHOD

Source code

signedAngleBetween(a : Array<Float>, b : Array<Float>, n : Array<Float>) : Float

angleBetweenNormalized2d

STATIC METHOD

Source code

angleBetweenNormalized2d(a : Array<Float>, b : Array<Float>) : Float

domain

STATIC METHOD

Source code

domain(a : Array<Float>) : Float

range

STATIC METHOD

Source code

range(max : Int) : Array<Float>

span

STATIC METHOD

Source code

span(min : Float, max : Float, step : Float) : Array<Float>

neg

STATIC METHOD

Source code

neg(arr : Array<Float>) : Array<Float>

min

STATIC METHOD

Source code

min(arr : Array<Float>) : Float

max

STATIC METHOD

Source code

max(arr : Array<Float>) : Float

all

STATIC METHOD

Source code

all(arr : Array<Bool>) : Bool

finite

STATIC METHOD

Source code

finite(arr : Array<Float>) : Array<Bool>

onRay

STATIC METHOD

Source code

onRay(origin : Point, dir : Vector, u : Float) : Array<Float>

lerp

STATIC METHOD

Source code

lerp(i : Float, u : Array<Float>, v : Array<Float>) : Array<Float>

normalized

STATIC METHOD

Source code

normalized(arr : Array<Float>)

cross

STATIC METHOD

Source code

cross(u : Array<Float>, v : Array<Float>) : Array<Float>

dist

STATIC METHOD

Source code

dist(a : Array<Float>, b : Array<Float>) : Float

distSquared

STATIC METHOD

Source code

distSquared(a : Array<Float>, b : Array<Float>) : Float

sum

STATIC METHOD

Source code

sum(a : Iterable<Float>) : Float

addAll

STATIC METHOD

Source code

addAll(a : Iterable<Array<Float>>) : Array<Float>

addAllMutate

STATIC METHOD

Source code

addAllMutate(a : Array<Array<Float>>)

addMulMutate

STATIC METHOD

Source code

addMulMutate(a : Array<Float>, s : Float, b : Array<Float>)

subMulMutate

STATIC METHOD

Source code

subMulMutate(a : Array<Float>, s : Float, b : Array<Float>)

addMutate

STATIC METHOD

Source code

addMutate(a : Array<Float>, b : Array<Float>)

subMutate

STATIC METHOD

Source code

subMutate(a : Array<Float>, b : Array<Float>)

mulMutate

STATIC METHOD

Source code

mulMutate(a : Float, b : Array<Float>)

norm

STATIC METHOD

Source code

norm(a : Iterable<Float>) : Float

normSquared

STATIC METHOD

Source code

normSquared(a : Iterable<Float>) : Float

rep

STATIC METHOD

Source code

rep<T>(num : Int, ele : T) : Array<T>

zeros1d

STATIC METHOD

Source code

zeros1d(rows : Int) : Array<Float>

zeros2d

STATIC METHOD

Source code

zeros2d(rows : Int, cols : Int) : Array<Array<Float>>

zeros3d

STATIC METHOD

Source code

zeros3d(rows : Int, cols : Int, depth : Int) : Array<Array<Array<Float>>>

dot

STATIC METHOD

Source code

dot(a : Array<Float>, b : Array<Float>) : Float

add

STATIC METHOD

Source code

add(a : Array<Float>, b : Array<Float>) : Array<Float>

mul

STATIC METHOD

Source code

mul(a : Float, b : Array<Float>) : Array<Float>

div

STATIC METHOD

Source code

div(a : Array<Float>, b : Float) : Array<Float>

sub

STATIC METHOD

Source code

sub(a : Array<Float>, b : Array<Float>) : Array<Float>

isZero

STATIC METHOD

Source code

isZero(vec : Array<Float>)

sortedSetUnion

STATIC METHOD

Source code

sortedSetUnion(a : Array<Float>, b : Array<Float>) : Array<Float>

sortedSetSub

STATIC METHOD

Source code

sortedSetSub(a : Array<Float>, b : Array<Float>) : Array<Float>

a is superset, hence it is always longer or equal