Functions

add(v1, v2) Addition
angle(v1, v2) Angle
casteljau(v1, v2, v3, v4, t) Casteljau Spline
cross(v1, v2) Cross Product
div(v1, v2) Division
dot(v1, v2) Dot Product
easein2(v1, v2, t) Quadtratic ease in
easeinout2(v1, v2, t) Quadtratic ease in/out
easeout2(v1, v2, t) Quadtratic ease out
hermite(v1, t1, v2, t2, t) Hermite Tangent Spline
hermite2(v1, v2, v3, v4, t) Hermite Spline
lerp(v1, v2, t) Linear Interpolation
mag(v) Magnitude
mag_sqr(v) Squared Magnitude
max(v1, v2) Maximum
min(v1, v2) Minimum
mod(v, m) Modulo
mul(v1, v2) Multiply
normal(v1, v2, v3) Normal
normalize(v) Normalize
rotaxis(v1, v2) Rotation axis
scale(v, s) Scale
slerp(v1, v2) Spherical Linear Interpolation
sub(v1, v2) Subtraction
tangent(v) Tangent

Functions

add(v1, v2)

Adds 2 vectors

Parameters:

v1 First vector
v2 Second vector

Return:

  • Result vector
angle(v1, v2)

Finds the angle between 2 vectors

Parameters:

v1 First vector
v2 Second vector

Return:

  • Result vector
casteljau(v1, v2, v3, v4, t)

Finds a point on a Casteljau spline

Parameters:

v1 First vector
v2 Second vector
v3 Third vector
v4 Fourth vector
t Amount along spline [0, 1]

Return:

  • Result vector
cross(v1, v2)

Caluclates the cross product of 2 vectors

Parameters:

v1 First vector
v2 Second vector

Return:

  • Result vector
div(v1, v2)

Component-wise division of 2 vectors

Parameters:

v1 First vector
v2 Second vector

Return:

  • Result vector
dot(v1, v2)

Dot product of 2 vectors

Parameters:

v1 First vector
v2 Second vector

Return:

  • Dot product
easein2(v1, v2, t)

Executes a quadratic ease in between 2 vectors

Parameters:

v1 First vector
v2 Second vector
t Ease amount [0, 1]

Return:

  • Result vector
easeinout2(v1, v2, t)

Executes a quadratic ease in/out between 2 vectors

Parameters:

v1 First vector
v2 Second vector
t Ease amount [0, 1]

Return:

  • Result vector
easeout2(v1, v2, t)

Executes a quadratic ease out between 2 vectors

Parameters:

v1 First vector
v2 Second vector
t Ease amount [0, 1]

Return:

  • Result vector
hermite(v1, t1, v2, t2, t)

Finds a point on a Hermite spline specified by points and tangents.

Parameters:

v1 First point
t1 Tangent at first point
v2 Second point
t2 Tangent at second point
t Amount along spline [0, 1]

Return:

  • Result vector
hermite2(v1, v2, v3, v4, t)

Finds a point on a Hermite spline specified by points.

Parameters:

v1 First point
v2 Second point
v3 Third point
v4 Fourth point
t Amount along spline [0, 1]

Return:

  • Result vector
lerp(v1, v2, t)

Executes a linear interpolation between 2 vectors

Parameters:

v1 First vector
v2 Second vector
t Interpolation amount [0, 1]

Return:

  • Result vector
mag(v)

Gets the magnitude of a vector

Parameters:

v Vector

Return:

  • Magnitude
mag_sqr(v)

Gets the squared magnitude of a vector

Parameters:

v Vector

Return:

  • Squared magnitude
max(v1, v2)

Component-wise maximum between 2 vectors

Parameters:

v1 First vector
v2 Second vector

Return:

  • Result vector
min(v1, v2)

Component-wise minimum between 2 vectors

Parameters:

v1 First vector
v2 Second vector

Return:

  • Result vector
mod(v, m)

Component-wise modulo of a vector

Parameters:

v Vector
m Module factor

Return:

  • Result vector
mul(v1, v2)

Component-wise multiply of 2 vectors

Parameters:

v1 First vector
v2 Second vector

Return:

  • Result vector
normal(v1, v2, v3)

Finds a normal to a triangle

Parameters:

v1 First point
v2 Second point
v3 Third point

Return:

  • Result vector
normalize(v)

Normalizes a vector

Parameters:

v Vector

Return:

  • Result vector
rotaxis(v1, v2)

Finds the rotation axis between 2 vectors

Parameters:

v1 First vector
v2 Second vector

Return:

  • Result vector
scale(v, s)

Scale a vector by a factor

Parameters:

v Vector
s Scale factor

Return:

  • Result vector
slerp(v1, v2)

Executes a spherical linear interpolation between 2 vectors

Parameters:

v1 First vector
v2 Second vector

Return:

  • Result vector
sub(v1, v2)

Subtracts 2 vectors

Parameters:

v1 First vector
v2 Second vector

Return:

  • Result vector
tangent(v)

Finds an arbitrary tanget in the vector's tangent plane.

Parameters:

v Vector

Return:

  • Result vector