Welcome to the rtgmath
reference docs.
Please note that the .region* portion of the api is undocumented as it is still considered wip.
A selection of the math routines most commonly needed for realtime graphics in lisp
Welcome to the rtgmath
reference docs.
Please note that the .region* portion of the api is undocumented as it is still considered wip.
(
DECF
PLACE &OPTIONAL DELTA
)
(
INCF
PLACE &OPTIONAL DELTA
)
(
*
&REST (VEC2S VEC2)
)
(
*S
(VECTORA VEC2) (A SINGLEFLOAT)
)
Componentwise multiplication of the vector by the scalar
(
+
&REST (VEC2S VEC2)
)
(
+S
(VEC2 VEC2) (SCALAR SINGLEFLOAT)
)
Componentwise add of singlefloat to vec2
(

(VEC2 VEC2) &REST (VEC2S VEC2)
)
(
S
(VEC2 VEC2) (SCALAR SINGLEFLOAT)
)
Componentwise subtraction of singlefloat from vec2
(
/
(VECTORA VEC2) (VECTORB VEC2)
)
Componentwise division of the two vec2
(
/S
(VECTORA VEC2) (A SINGLEFLOAT)
)
Componentwise division of the vector by the scalar
(
0P
(VECTORA VEC2)
)
Checks if the length of the vector is zero. As this is a floating point number it checks to see if the length is below a threshold set in the basemaths package
Note: Old, float epsilons are tricky, I have a ticket open to review this
(
=
(VECTORA VEC2) (VECTORB VEC2)
)
Returns T if the two vectors are equal. Otherwise it returns nil.
(
ABS
(VECTORA VEC2)
)
(
ABSOLUTEDOT
(VECTORA VEC2) (VECTORB VEC2)
)
Return the absolute dot product of the vectora and vectorb.
(
ANGLEBETWEEN
(VECA VEC2) (VECB VEC2)
)
Returns the angle between two vec2
s.
Equivilent to (abs (v2:anglefrom a b))
(
ANGLEFROM
(VECFROM VEC2) (VECTO VEC2)
)
Returns the signed angle between the two vec2
s.
Positive angles are counterclockwise
(
BEZIER
(A1 VEC2) (A2 VEC2) (B1 VEC2) (B2 VEC2) (AMMOUNT SINGLEFLOAT)
)
{TODO}
(
COPYVEC2
(VEC2 VEC2)
)
Returns a fresh vec2
which is v2:= to the orignal vector
(
CROSS
(VECA VEC2) (VECB VEC2)
)
Calculates the crossproduct of 2 vec2
s. This results in a singlefloat
which is 2 times the area of the triangle.
(
DISTANCE
(VECTORA VEC2) (VECTORB VEC2)
)
Return the distance between 2 points defined by vectors
vectora & vectorb. If comparing distances, use
cdistancesquared as it desnt require a sqrt and thus is
faster.
If simply comparing distances then prefer the distancesquared
function as
the sqrt
required here is (relatively) slow.
(
DISTANCESQUARED
(VECTORA VEC2) (VECTORB VEC2)
)
Finds the squared distance between 2 points defined by vec2
s
vectora & vectorb
distance
is the square root of this value. The sqrt
function is
(relatively) slow so if all thats needs doing is to compare distances
then prefer the distancesquared
function
(
DOT
(VECTORA VEC2) (VECTORB VEC2)
)
Return the dot product of vectora and vectorb.
(
FACEFOREWARD
(VECTORA VEC2) (VECTORB VEC2)
)
(
FROMANGLE
(ANGLE SINGLEFLOAT)
)
(
FROMCOMPLEX
(C COMPLEX)
)
(
LENGTH
(VECTORA VEC2)
)
Returns the length of the vec2
If you only need to compare relative lengths then prefer the lengthsquared
function as sqrt
is a (relatively) slow operation.
(
LENGTHSQUARED
(VECTORA VEC2)
)
Return the squared length of the vec2
length
is the square root of this value. The sqrt
function is
(relatively slow so if all thats needs doing is to compare lengths then
prefer the lengthsquared
function
(
LERP
(VECTORA VEC2) (VECTORB VEC2) (AMMOUNT SINGLEFLOAT)
)
Linearly interpolates between the two vec2
s by the singlefloat
amount
(
MAKE
(X SINGLEFLOAT) (Y SINGLEFLOAT)
)
This takes 2 singlefloats and give back a vec2
.
(
NEGATE
(VECTORA VEC2)
)
Return a vector that is the negated version of the vector passed in
(
NORMALIZE
(VECTORA VEC2)
)
This normalizes the given vec2
.
(
PERPDOT
(VECA VEC2) (VECB VEC2)
)
{TODO}
(
ROTATE
(VEC VEC2) (ANGLE SINGLEFLOAT)
)
Creates a new vec2
which is equivilent to the original once rotated
counterclockwise by angle
radians.
(
SPLINE
X KNOTS
)
{TODO}
(
UNITP
(VECTORA VEC2)
)
Checks if the vector is of unit length. As this is a floating point number it checks to see if the length is within the range of 1 + or  and threshold set in basemaths
Note: Old, float epsilons are tricky, I have a ticket open to review this
(
DECF
PLACE &OPTIONAL DELTA
)
(
INCF
PLACE &OPTIONAL DELTA
)
(
*
&REST (VEC3S VEC3)
)
(
*S
(VECTORA VEC3) (A SINGLEFLOAT)
)
Componentwise multiplication of the vector by the scalar
(
+
&REST (VEC3S VEC3)
)
(
+S
(VEC3 VEC3) (SCALAR SINGLEFLOAT)
)
Componentwise add of singlefloat to vec3
(

(VEC3 VEC3) &REST (VEC3S VEC3)
)
(
S
(VEC3 VEC3) (SCALAR SINGLEFLOAT)
)
Componentwise subtraction of singlefloat from vec3
(
/
(VECTORA VEC3) (VECTORB VEC3)
)
Componentwise division of the two vec3
(
/S
(VECTORA VEC3) (A SINGLEFLOAT)
)
Componentwise division of the vector by the scalar
(
0P
(VECTORA VEC3)
)
Checks if the length of the vector is zero. As this is a floating point number it checks to see if the length is below a threshold set in the basemaths package
Note: Old, float epsilons are tricky, I have a ticket open to review this
(
=
(VECTORA VEC3) (VECTORB VEC3)
)
Returns either t if the two vectors are equal. Otherwise it returns nil.
(
ABS
(VECTORA VEC3)
)
(
ABSOLUTEDOT
(VECTORA VEC3) (VECTORB VEC3)
)
Return the absolute dot product of the vectora and vectorb.
(
BEZIER
(A1 VEC3) (A2 VEC3) (B1 VEC3) (B2 VEC3) (AMMOUNT SINGLEFLOAT)
)
{TODO}
(
COPYVEC3
(VEC3 VEC3)
)
Returns a fresh vec3
which is v3:= to the orignal vector
(
CROSS
(VECA VEC3) (VECB VEC3)
)
(
DISTANCE
(VECTORA VEC3) (VECTORB VEC3)
)
Return the distance between 2 points defined by vectors
vectora & vectorb. If comparing distances, use
cdistancesquared as it desnt require a sqrt and thus is
faster.
If simply comparing distances then prefer the distancesquared
function as
the sqrt
required here is (relatively) slow.
(
DISTANCESQUARED
(VECTORA VEC3) (VECTORB VEC3)
)
Finds the squared distance between 2 points defined by vec3
s
vectora & vectorb
distance
is the square root of this value. The sqrt
function is
(relatively) slow so if all thats needs doing is to compare distances
then prefer the distancesquared
function
(
DOT
(VECTORA VEC3) (VECTORB VEC3)
)
Return the dot product of vectora and vectorb.
(
FACEFOREWARD
(VECTORA VEC3) (VECTORB VEC3)
)
(
LENGTH
(VECTORA VEC3)
)
Returns the length of the vec3
If you only need to compare relative lengths then prefer the lengthsquared
function as sqrt
is a (relatively) slow operation.
(
LENGTHSQUARED
(VECTORA VEC3)
)
Return the squared length of the vec3
length
is the square root of this value. The sqrt
function is
(relatively slow so if all thats needs doing is to compare lengths then
prefer the lengthsquared
function
(
LERP
(VECTORA VEC3) (VECTORB VEC3) (AMMOUNT SINGLEFLOAT)
)
Linearly interpolates between the two vec3
s by the singlefloat
amount
(
MAKE
(X SINGLEFLOAT) (Y SINGLEFLOAT) (Z SINGLEFLOAT)
)
Make a vec3
from 3 singlefloat
s
(
NEGATE
(VECTORA VEC3)
)
Return a vector that is the negated version of the vector passed in
(
NORMALIZE
(VECTORA VEC3)
)
This normalizes the given vec3
.
(
ROTATE
(VEC VEC3) (ROTATION VEC3)
)
Creates a new vec3
which is equivilent to the original once rotated
in each axis by the radians in the rotation
vec3 provided.
(
SPLINE
X KNOTS
)
{TODO}
(
UNITP
(VECTORA VEC3)
)
Checks if the vector is of unit length. As this is a floating point number it checks to see if the length is within the range of 1 + or  and threshold set in basemaths
Note: Old, float epsilons are tricky, I have a ticket open to review this
(
DECF
PLACE &OPTIONAL DELTA
)
(
INCF
PLACE &OPTIONAL DELTA
)
(
*
&REST (VEC4S VEC4)
)
(
*S
(VECTORA VEC4) (A SINGLEFLOAT)
)
Componentwise multiplication of the vector by the scalar
(
+
&REST (VEC4S VEC4)
)
(
+S
(VEC4 VEC4) (SCALAR SINGLEFLOAT)
)
Componentwise add of singlefloat to vec4
(

(VEC4 VEC4) &REST (VEC4S VEC4)
)
(
S
(VEC4 VEC4) (SCALAR SINGLEFLOAT)
)
Componentwise subtraction of singlefloat from vec4
(
/
(VECTORA VEC4) (VECTORB VEC4)
)
Componentwise division of the two vec4
(
/S
(VECTORA VEC4) (A SINGLEFLOAT)
)
Componentwise division of the vector by the scalar
(
0P
(VECTORA VEC4)
)
Checks if the length of the vector is zero. As this is a floating point number it checks to see if the length is below a threshold set in the basemaths package
Note: Old, float epsilons are tricky, I have a ticket open to review this
(
=
(VECTORA VEC4) (VECTORB VEC4)
)
Returns either t if the two vectors are equal. Otherwise it returns nil.
(
ABS
(VECTORA VEC4)
)
(
ABSOLUTEDOT
(VECTORA VEC4) (VECTORB VEC4)
)
Return the absolute dot product of the vectora and vectorb.
(
BEZIER
(A1 VEC4) (A2 VEC4) (B1 VEC4) (B2 VEC4) (AMMOUNT SINGLEFLOAT)
)
{TODO}
(
COPYVEC4
(VEC4 VEC4)
)
Returns a fresh vec4
which is v4:= to the orignal vector
(
DISTANCE
(VECTORA VEC4) (VECTORB VEC4)
)
Return the distance between 2 points defined by vectors
vectora & vectorb. If comparing distances, use
cdistancesquared as it desnt require a sqrt and thus is
faster.
If simply comparing distances then prefer the distancesquared
function as
the sqrt
required here is (relatively) slow.
(
DISTANCESQUARED
(VECTORA VEC4) (VECTORB VEC4)
)
Finds the squared distance between 2 points defined by vec4
s
vectora & vectorb
distance
is the square root of this value. The sqrt
function is
(relatively) slow so if all thats needs doing is to compare distances
then prefer the distancesquared
function
(
DOT
(VECTORA VEC4) (VECTORB VEC4)
)
Return the dot product of vectora and vectorb.
(
FACEFOREWARD
(VECTORA VEC4) (VECTORB VEC4)
)
(
LENGTH
(VECTORA VEC4)
)
Returns the length of the vec4
If you only need to compare relative lengths then prefer the lengthsquared
function as sqrt
is a (relatively) slow operation.
(
LENGTHSQUARED
(VECTORA VEC4)
)
Return the squared length of the vec4
length
is the square root of this value. The sqrt
function is
(relatively slow so if all thats needs doing is to compare lengths then
prefer the lengthsquared
function
(
LERP
(VECTORA VEC4) (VECTORB VEC4) (AMMOUNT SINGLEFLOAT)
)
Linearly interpolates between the two vec4
s by the singlefloat
amount
(
MAKE
(X SINGLEFLOAT) (Y SINGLEFLOAT) (Z SINGLEFLOAT) (W SINGLEFLOAT)
)
Make a vec4
from 4 singlefloat
s
(
NEGATE
(VECTORA VEC4)
)
Return a vector that is the negated version of the vector passed in
(
NORMALIZE
(VECTORA VEC4)
)
This normalizes the given vec4
.
(
SPLINE
X KNOTS
)
{TODO}
(
UNITP
(VECTORA VEC4)
)
Checks if the vector is of unit length. As this is a floating point number it checks to see if the length is within the range of 1 + or  and threshold set in basemaths
Note: Old, float epsilons are tricky, I have a ticket open to review this
(
*
(ACCUMVEC VEC2) &REST (VEC2S VEC2)
)
(
*S
(VEC2 VEC2) (A SINGLEFLOAT)
)
Destructively performs componentwise multiplication of the vec2
by
the scalar
(
+
(ACCUMVEC VEC2) &REST (VEC2S VEC2)
)
(
+S
(VEC2 VEC2) (SCALAR SINGLEFLOAT)
)
Destructive Componentwise add of singlefloat
into the given vec2
(

(ACCUMVEC VEC2) &REST (VEC2S VEC2)
)
(
S
(VEC2 VEC2) (SCALAR SINGLEFLOAT)
)
Destructive Componentwise subtraction of singlefloat
from the given vec2
(
/
(VEC2A VEC2) (VEC2B VEC2)
)
(
/S
(VEC2 VEC2) (A SINGLEFLOAT)
)
Destructively performs componentwise division of the vec2
by
the scalar
(
NEGATE
(VECTORA VEC2)
)
Destructively negates the given vector
(
NORMALIZE
(VECTORA VEC2)
)
Destructively normalizes the vector
(
ROTATE
(VEC VEC2) (ANGLE SINGLEFLOAT)
)
Rotates the give vec2
counterclockwise by angle
radians.
(
SETCOMPONENTS
(X SINGLEFLOAT) (Y SINGLEFLOAT) (VEC VEC2)
)
Destructively updates of the components of the given vec2
to the new singlefloat
s provided.
(
*
(ACCUMVEC VEC3) &REST (VEC3S VEC3)
)
(
*S
(VEC3 VEC3) (A SINGLEFLOAT)
)
Destructively performs componentwise multiplication of the vec3
by
the scalar
(
+
(ACCUMVEC VEC3) &REST (VEC3S VEC3)
)
(
+S
(VEC3 VEC3) (SCALAR SINGLEFLOAT)
)
Destructive Componentwise add of singlefloat
into the given vec3
(

(ACCUMVEC VEC3) &REST (VEC3S VEC3)
)
(
S
(VEC3 VEC3) (SCALAR SINGLEFLOAT)
)
Destructive Componentwise subtraction of singlefloat
from the given vec3
(
/
(VEC3A VEC3) (VEC3B VEC3)
)
(
/S
(VEC3 VEC3) (A SINGLEFLOAT)
)
Destructively performs componentwise division of the vec3
by
the scalar
(
NEGATE
(VECTORA VEC3)
)
Destructively negates the given vector
(
NORMALIZE
(VECTORA VEC3)
)
Destructively normalizes the vector
(
ROTATE
(VEC VEC3) (ROTATION VEC3)
)
Rotates the given vec3
counterclockwise by the radians in the rotation
vec3 provided.
(
SETCOMPONENTS
(X SINGLEFLOAT) (Y SINGLEFLOAT) (Z SINGLEFLOAT) (VEC VEC3)
)
Destructively updates of the components of the given vec3
to the new singlefloat
s provided.
(
*
(ACCUMVEC VEC4) &REST (VEC4S VEC4)
)
(
*S
(VEC4 VEC4) (A SINGLEFLOAT)
)
Destructively performs componentwise multiplication of the vec4
by
the scalar
(
+
(ACCUMVEC VEC4) &REST (VEC4S VEC4)
)
(
+S
(VEC4 VEC4) (SCALAR SINGLEFLOAT)
)
Destructive Componentwise add of singlefloat
into the given vec2
(

(ACCUMVEC VEC4) &REST (VEC4S VEC4)
)
(
S
(VEC4 VEC4) (SCALAR SINGLEFLOAT)
)
Destructive Componentwise subtraction of singlefloat
from the given vec2
(
/
(VEC4A VEC4) (VEC4B VEC4)
)
(
/S
(VEC4 VEC4) (A SINGLEFLOAT)
)
Destructively performs componentwise division of the vec4
by
the scalar
(
NEGATE
(VECTORA VEC4)
)
Destructively negates the given vector
(
NORMALIZE
(VECTORA VEC4)
)
Destructively normalizes the vector
(
SETCOMPONENTS
(X SINGLEFLOAT) (Y SINGLEFLOAT) (Z SINGLEFLOAT) (W SINGLEFLOAT) (VEC VEC4)
)
Destructively updates of the components of the given vec2
to the new singlefloat
s provided.
(
DECF
PLACE &OPTIONAL DELTA
)
Decrements the vector in 'place' by another vector of the same kind
(
INCF
PLACE &OPTIONAL DELTA
)
Increments the vector in 'place' by another vector of the same kind
(
*
VECA SCALARORVEC
)
Adds two vectors together and returns the result as a new vector of the same type
(
+
&REST VECS
)
(
+S
VEC SCALAR
)
(

&REST VECS
)
(
S
VEC SCALAR
)
(
/
VECA SCALARORVEC
)
(
/=
&REST VECS
)
Returns either t if the two vectors are equal. Otherwise it returns nil.
(
0P
VECA
)
Returns t if the vector is of zero length
(
=
&REST VECS
)
Returns either t if the vectors are equal. Otherwise it returns nil.
(
ABSOLUTEDOT
VECA VECB
)
Adds two vectors together and returns the result as a new vector of the same type
(
BEZIER
A1 A2 B1 B2 AMMOUNT
)
{TODO}
(
CROSS
VECA VECB
)
Calculates the crossproduct of 2 vectors, i.e. the vector that lies perpendicular to them both. The resulting vector will not be normalized.
(
DISTANCE
VECA VECB
)
Return the distance between 2 points defined by vectors vectora & vectorb. If comparing distances, use cdistancesquared as it desnt require a sqrt and thus is faster.
(
DISTANCESQUARED
VECA VECB
)
Returns the squared distance between 2 points defined by vectors vectora & vectorb
(
DOT
VECA VECB
)
Returns the dot product of the 2 given vectors.
(
FACEFOREWARD
VECA VECB
)
(
LENGTH
VECA
)
Returns the length of a vector If you only need to compare relative lengths then definately stick to lengthsquared as the sqrt is a slow operation.
(
LENGTHSQUARED
VECA
)
Finds the squared distance between 2 points defined by vectors vectora & vectorb
(
LERP
VECTORA VECTORB AMMOUNT
)
Linearly interpolates between the two vectors by the given amount. Returns a new vector of the same kind.
(
MERGEINTOVECTOR
&REST VECTORS
)
Takes a list of vectors and combines them into a new vector
(
MIX
VECTORA VECTORB AMMOUNT
)
Linearly interpolates between the two vectors by the given amount. Returns a new vector of the same kind.
(
NEGATE
VEC
)
Negates the given vector. Returns a new vector of the same kind.
(
NORMALIZE
VECA
)
Normalizes the vector. Returns a new vector of the same kind.
(
PERPDOT
VECA VECB
)
{TODO}
(
SWIZZLE
VEC PATTERN
)
(
S~
VEC PATTERN
)
(
UNITP
VECA
)
Returns T is the given vector has a length eql to 1
(
W
VEC
)
Returns the w component of the vector
(
X
VEC
)
Returns the x component of the vector
(
Y
VEC
)
Returns the y component of the vector
(
Z
VEC
)
Returns the z component of the vector
(
*
&REST (MATRICES MAT2)
)
(
*S
(MATA MAT2) (SCALAR SINGLEFLOAT)
)
Multiplies the components of the mat2
by the scalar
provided
(
*V
(MATA MAT2) (VECA VEC2)
)
(
+
(MATA MAT2) (MATB MAT2)
)
Adds the 2 matrices component wise and returns the result as
a new mat2
(

(MATA MAT2) (MATB MAT2)
)
Subtracts the 2 matrices component wise and returns the result
as a new mat2
(
0!
)
Return a mat2
where all components are zero
(
0P
(MATA MAT2)
)
Returns T if this is a zero matrix
As contents of the matrix are floats the values have an error bound as defined in basemaths
Note: Old, float epsilons are tricky, I have a ticket open to review this
(
=
(MATA MAT2) (MATB MAT2)
)
Returns T if all elements of both matrices provided are equal
(
ADJOINT
(MATA MAT2)
)
Returns the adjoint of the provided matrix
(
COPYMAT2
(MAT2 MAT2)
)
Returns a fresh mat2
which is m2:= to the orignal matrix
(
FROMCOLUMNS
(COL1 VEC2) (COL2 VEC2)
)
(
FROMROWS
(ROW1 VEC2) (ROW2 VEC2)
)
(
GETCOLUMN
(MATA MAT2) (COLNUM (INTEGER 0 1))
)
Return the specified column of the matrix as a vec2
(
GETCOLUMNS
(MATA MAT2)
)
Return the columns of the matrix as 2 vec2
s
(
GETROW
(MATA MAT2) (ROWNUM (INTEGER 0 1))
)
Return the specified row of the matrix as a vec2
(
GETROWS
(MATA MAT2)
)
Return the rows of the matrix as 2 vec2
s
(
IDENTITY
)
Return a mat2
identity matrix
(
IDENTITYP
(MATA MAT2)
)
Returns T if this is an identity matrix
As contents of the matrix are floats the values have an error bound as defined in basemaths
Note: Old, float epsilons are tricky, I have a ticket open to review this
(
MAKE
(A SINGLEFLOAT) (B SINGLEFLOAT) (C SINGLEFLOAT) (D SINGLEFLOAT)
)
Make a mat2
. Data must be provided in row major order
(
MELM
(MATA MAT2) (ROW (INTEGER 0 1)) (COL (INTEGER 0 1))
)
Provides access to data in the matrix by row and column number. The actual data is stored in a 1d list in column major order, but this abstraction means we only have to think in row major order which is how most mathematical texts and online tutorials choose to show matrices
(
MROW*VEC2
(VEC VEC2) (MATA MAT2)
)
{TODO}
(
NEGATE
(MATA MAT2)
)
Negates the components of the mat2
(
ROTATIONFROMEULER
(ANGLE SINGLEFLOAT)
)
Creates a rotation mat2
which represents a anticlockwise rotation.
The angle is specified in radians
(
SCALE
(SCALEVEC2 VEC2)
)
Returns a matrix which will scale by the amounts specified
(
TRACE
(MATA MAT2)
)
Returns the trace of the matrix (That is the diagonal values)
(
TRANSPOSE
(MATA MAT2)
)
Returns the transpose of the provided matrix
(
*
&REST (MATRICES MAT3)
)
(
*S
(MATA MAT3) (SCALAR SINGLEFLOAT)
)
Multiplies the components of the mat3
by the scalar
provided
(
*V
(MATA MAT3) (VECA VEC3)
)
(
+
(MATA MAT3) (MATB MAT3)
)
Adds the 2 matrices component wise and returns the result as
a new mat3
(

(MATA MAT3) (MATB MAT3)
)
Subtracts the 2 matrices component wise and returns the result
as a new mat3
(
0!
)
(
0P
(MATA MAT3)
)
Returns T if this is a zero matrix
As contents of the matrix are floats the values have an error bound as defined in basemaths
Note: Old, float epsilons are tricky, I have a ticket open to review this
(
=
(MATA MAT3) (MATB MAT3)
)
Returns T if all elements of both matrices provided are equal
(
ADJOINT
(MATA MAT3)
)
Returns the adjoint of the provided matrix
(
AFFINEINVERSE
(MATA MAT3)
)
returns the inverse of the mat3
(
COPYMAT3
(MAT3 MAT3)
)
Returns a fresh mat3
which is m3:= to the orignal matrix
(
DETERMINANT
(MATA MAT3)
)
Returns the determinant of the mat3
(uses the cramer method)
(
FROMCOLUMNS
(COL1 VEC3) (COL2 VEC3) (COL3 VEC3)
)
(
FROMDIRECTION
(UP3 VEC3) (DIR3 VEC3)
)
Creates a mat3
that would rotate the vector (v! 0 0 1) to point in the given
direction.
(
FROMROWS
(ROW1 VEC3) (ROW2 VEC3) (ROW3 VEC3)
)
(
GETAXISANGLE
(MATA MAT3)
)
Gets one possible axisangle pair that will generate this mat3
.
Assumes that this is a rotation matrix. It is critical that this is true (and elements are between 1f0 and 1f0) as otherwise you will at best get a runtime error, and most likely a silently incorrect result.
(
GETCOLUMN
(MATA MAT3) (COLNUM (INTEGER 0 3))
)
Return the specified column of the matrix as a vec3
(
GETCOLUMNS
(MATA MAT3)
)
Return the columns of the matrix as 3 vec3
s
(
GETFIXEDANGLES
(MATA MAT3)
)
Gets one set of possible zyx fixed angles that will generate
this mat3
.
Assumes that this is a rotation matrix. It is critical that this is true (and elements are between 1f0 and 1f0) as otherwise you will at best get a runtime error, and most likely a silently incorrect result.
(
GETROW
(MATA MAT3) (ROWNUM (INTEGER 0 3))
)
Return the specified row of the matrix as a vec3
(
GETROWS
(MATA MAT3)
)
Return the rows of the matrix as 3 vec3
s
(
IDENTITY
)
Return a mat3
identity matrix
(
IDENTITYP
(MATA MAT3)
)
Returns T if this is an identity matrix
As contents of the matrix are floats the values have an error bound as defined in basemaths
Note: Old, float epsilons are tricky, I have a ticket open to review this
(
LOOKAT
(UP3 VEC3) (FROM3 VEC3) (TO3 VEC3)
)
Creates a mat3
that would rotate the vector (v! 0 0 1) to point in the
direction from from3
to to3
(
MAKE
(A SINGLEFLOAT) (B SINGLEFLOAT) (C SINGLEFLOAT) (D SINGLEFLOAT)
(E SINGLEFLOAT) (F SINGLEFLOAT) (G SINGLEFLOAT) (H SINGLEFLOAT)
(I SINGLEFLOAT)
)
Make a mat3
. Data must be provided in row major order
(
MELM
(MATA MAT3) (ROW (INTEGER 0 2)) (COL (INTEGER 0 2))
)
Provides access to data in the matrix by row and column number. The actual data is stored in a 1d list in column major order, but this abstraction means we only have to think in row major order which is how most mathematical texts and online tutorials choose to show matrices
(
MROW*VEC3
(VEC VEC3) (MATA MAT3)
)
{TODO}
(
NEGATE
(MATA MAT3)
)
Negates the components of the mat3
(
POINTAT
(UP VEC3) (FROM3 VEC3) (TO3 VEC3)
)
Create the mat3
rotation portion to a 'world to view' 'lookat' matrix
(
ROTATIONFROMAXISANGLE
(AXIS3 VEC3) (ANGLE SINGLEFLOAT)
)
Returns a mat3
which will rotate a point about the axis
specified by the angle provided
(
ROTATIONFROMEULER
(VEC3A VEC3)
)
Creates a rotation mat3
which represents a anticlockwise rotation.
The angle is specified in radians
(
ROTATIONX
(ANGLE SINGLEFLOAT)
)
Returns a mat3
which would rotate a point around the x axis
by the specified amount
(
ROTATIONY
(ANGLE SINGLEFLOAT)
)
Returns a mat3
which would rotate a point around the y axis
by the specified amount
(
ROTATIONZ
(ANGLE SINGLEFLOAT)
)
Returns a mat3
which would rotate a point around the z axis
by the specified amount
(
SCALE
(SCALEVEC3 VEC3)
)
Returns a matrix which will scale by the amounts specified
(
TRACE
(MATA MAT3)
)
Returns the trace of the matrix (That is the diagonal values)
(
TRANSPOSE
(MATA MAT3)
)
Returns the transpose of the provided matrix
(
*
&REST (MATRICES MAT4)
)
(
*S
(MATA MAT4) (SCALAR SINGLEFLOAT)
)
Multiplies the components of the mat4
by the scalar
provided
(
*V
(MATA MAT4) (VEC4 VEC4)
)
(
*V3
(MATA MAT4) (VEC3 VEC3)
)
(
+
(MATA MAT4) (MATB MAT4)
)
Adds the 2 matrices component wise and returns the result as
a new mat4
(

(MATA MAT4) (MATB MAT4)
)
Subtracts the 2 matrices component wise and returns the result
as a new mat4
(
0!
)
Return a mat4
where every component is 0
(
0P
(MATA MAT4)
)
Returns T if this is a zero matrix
As contents of the matrix are floats the values have an error bound as defined in basemaths
Note: Old, float epsilons are tricky, I have a ticket open to review this
(
=
(MATA MAT4) (MATB MAT4)
)
Returns T if all elements of both matrices provided are equal
(
ADJOINT
(MATA MAT4)
)
Returns the adjoint of the provided matrix
(
AFFINEINVERSE
(MATA MAT4)
)
returns the inverse of the mat4
(
COPYMAT4
(MAT4 MAT4)
)
Returns a fresh mat4
which is m4:= to the orignal matrix
(
DETERMINANT
(MATA MAT4)
)
Returns the determinant of the mat4
(
FROMCOLUMNS
(COL1 VEC4) (COL2 VEC4) (COL3 VEC4) (COL4 VEC4)
)
(
FROMCOLUMNSV3
(COL1 VEC3) (COL2 VEC3) (COL3 VEC3)
)
(
FROMDIRECTION
(UP3 VEC3) (DIR3 VEC3)
)
Creates a mat4
that would rotate the vector (v! 0 0 1) to face in the given
direction.
(
FROMMAT3
(MA MAT3)
)
(
FROMROWS
(ROW1 VEC4) (ROW2 VEC4) (ROW3 VEC4) (ROW4 VEC4)
)
(
FROMROWSV3
(ROW1 VEC3) (ROW2 VEC3) (ROW3 VEC3)
)
(
GETAXISANGLE
(MATA MAT4)
)
Gets one possible axisangle pair that will generate this mat4
.
Assumes that this is a rotation matrix. It is critical that this is true (and elements are between 1f0 and 1f0) as otherwise you will at best get a runtime error, and most likely a silently incorrect result.
(
GETCOLUMN
(MATA MAT4) (COLNUM (INTEGER 0 3))
)
Return the specified column of the matrix as a vec4
(
GETCOLUMNS
(MATA MAT4)
)
Return the columns of the matrix as 4 vec4
s
(
GETFIXEDANGLES
(MATA MAT4)
)
Gets one set of possible zyx fixed angles that will generate
this mat4
.
Assumes that this is a rotation matrix. It is critical that this is true (and elements are between 1f0 and 1f0) as otherwise you will at best get a runtime error, and most likely a silently incorrect result.
(
GETROW
(MATA MAT4) (ROWNUM (INTEGER 0 3))
)
Return the specified row of the matrix as a vec4
(
GETROWS
(MATA MAT4)
)
Return the rows of the matrix as 4 vec4
s
(
IDENTITY
)
Return a mat4
identity matrix
(
IDENTITYP
(MATA MAT4)
)
Returns T if this is an identity matrix
As contents of the matrix are floats the values have an error bound as defined in basemaths
Note: Old, float epsilons are tricky, I have a ticket open to review this
(
INVERSE
(MATRIX MAT4)
)
Inverts the matrix.
(
LOOKAT
(UP3 VEC3) (FROM3 VEC3) (TO3 VEC3)
)
Creates a mat4
that would rotate the vector (v! 0 0 1) to point in the
direction from from3
to to3
(
MAKE
(A SINGLEFLOAT) (B SINGLEFLOAT) (C SINGLEFLOAT) (D SINGLEFLOAT)
(E SINGLEFLOAT) (F SINGLEFLOAT) (G SINGLEFLOAT) (H SINGLEFLOAT)
(I SINGLEFLOAT) (J SINGLEFLOAT) (K SINGLEFLOAT) (L SINGLEFLOAT)
(M SINGLEFLOAT) (N SINGLEFLOAT) (O SINGLEFLOAT) (P SINGLEFLOAT)
)
Make a mat4
. Data must be provided in row major order
(
MELM
(MATA MAT4) (ROW (INTEGER 0 3)) (COL (INTEGER 0 3))
)
Provides access to data in the matrix by row and column number. The actual data is stored in a 1d list in column major order, but this abstraction means we only have to think in row major order which is how most mathematical texts and online tutorials choose to show matrices
(
MINOR
(MATA MAT4) (ROW0 (INTEGER 0 3)) (ROW1 (INTEGER 0 3)) (ROW2 (INTEGER 0 3))
(COL0 (INTEGER 0 3)) (COL1 (INTEGER 0 3)) (COL2 (INTEGER 0 3))
)
Returns the minor of the matrix
(
MROW*VEC4
(VEC VEC4) (MATA MAT4)
)
{TODO}
(
NEGATE
(MATA MAT4)
)
Negates the components of the mat4
(
POINTAT
(UP VEC3) (FROM3 VEC3) (TO3 VEC3)
)
Create the mat4
rotation portion to a 'world to view' 'lookat' matrix
(
ROTATIONFROMAXISANGLE
(AXIS3 VEC3) (ANGLE SINGLEFLOAT)
)
Returns a mat4
which will rotate a point about the axis
specified by the angle provided
(
ROTATIONFROMEULER
(VEC3A VEC3)
)
Creates a rotation mat4
which represents a anticlockwise rotation.
The angle is specified in radians
(
ROTATIONFROMMAT3
(MA MAT3)
)
(
ROTATIONX
(ANGLE SINGLEFLOAT)
)
Returns a mat4
which would rotate a point around the x axis
by the specified amount
(
ROTATIONY
(ANGLE SINGLEFLOAT)
)
Returns a mat4
which would rotate a point around the y axis
by the specified amount
(
ROTATIONZ
(ANGLE SINGLEFLOAT)
)
Returns a mat4
which would rotate a point around the z axis
by the specified amount
(
SCALE
(SCALEVEC3 VEC3)
)
Returns a matrix which will scale by the amounts specified
(
TOMAT3
(MAT4 MAT4)
)
(
TRACE
(MATA MAT4)
)
Returns the trace of the matrix (That is the diagonal values)
(
TRANSLATION
(VECA (SIMPLEARRAY SINGLEFLOAT))
)
(
TRANSPOSE
(MA MAT4)
)
Returns the transpose of the provided matrix
(
*
(ACCUMMAT MAT2) &REST (MAT2S MAT2)
)
(
*S
(MATTOMUTATE MAT2) (SCALAR SINGLEFLOAT)
)
(
*V
(MATA MAT2) (VEC2TOMUTATE VEC2)
)
(
+
(MATACCUM MAT2) (MATB MAT2)
)
Add the second mat2
component wise to the first and return
the first
(

(MATACCUM MAT2) (MATB MAT2)
)
Subtracts the second mat2
component wise from the first and return
the first
(
ADJOINT
(MATTOMUTATE MAT2)
)
Mutates the given mat2
to be it's own adjoint
(
MROW*VEC2
(VEC2TOMUTATE VEC2) (MATA MAT2)
)
{TODO}
(
NEGATE
(MATTONEGATE MAT2)
)
Negates the components of the mat2
(
SETCOMPONENTS
(C00 SINGLEFLOAT) (C01 SINGLEFLOAT) (C10 SINGLEFLOAT) (C11 SINGLEFLOAT)
(MAT2TOMUTATE MAT2)
)
Destructively updates of the components of the given mat2
to the new singlefloat
s provided.
(
SETFROMCOLUMNS
(MATTOMUTATE MAT2) (COL1 VEC2) (COL2 VEC2)
)
(
SETFROMROWS
(MATTOMUTATE MAT2) (ROW1 VEC2) (ROW2 VEC2)
)
(
SETFROMSCALE
(MATTOMUTATE MAT2) (SCALEVEC2 VEC2)
)
Mutates the given mat2
to be a which will scale by the amounts specified
(
SETROTATIONFROMEULER
(MATTOMUTATE MAT2) (ANGLE SINGLEFLOAT)
)
Destructively modifies the mat2
to be a rotation matrix
whos rotation angle comes from the singlefloat provided.
(
TRANSPOSE
(MATTOTRANSPOSE MAT2)
)
Mutates the given mat2
to be it's own transpose
(
*
(ACCUMMAT MAT3) &REST (MAT3S MAT3)
)
(
*S
(MATTOMUTATE MAT3) (SCALAR SINGLEFLOAT)
)
Multiplies the components of the mat4
by the scalar
provided
(
*V
(MATA MAT3) (VEC3TOMUTATE VEC3)
)
(
+
(MATACCUM MAT3) (MATB MAT3)
)
Add the second mat3
component wise to the first and return
the first
(

(MATACCUM MAT3) (MATB MAT3)
)
Subtracts the second mat3
component wise from the first and return
the first
(
ADJOINT
(MATTOMUTATE MAT3)
)
Mutates the given mat3
to be it's own adjoint
(
AFFINEINVERSE
(MATTOINVERT MAT3)
)
Mutates the given mat3
to be it's own inverse
(
MROW*VEC3
(VEC3TOMUTATE VEC3) (MATA MAT3)
)
{TODO}
(
NEGATE
(MATTONEGATE MAT3)
)
Negates the components of the mat3
(
SETCOMPONENTS
(C00 SINGLEFLOAT) (C01 SINGLEFLOAT) (C02 SINGLEFLOAT) (C10 SINGLEFLOAT)
(C11 SINGLEFLOAT) (C12 SINGLEFLOAT) (C20 SINGLEFLOAT) (C21 SINGLEFLOAT)
(C22 SINGLEFLOAT) (MAT3TOMUTATE MAT3)
)
Destructively updates of the components of the given mat3
to the new singlefloat
s provided.
(
SETFROMCOLUMNS
(MATTOMUTATE MAT3) (COL1 VEC3) (COL2 VEC3) (COL3 VEC3)
)
(
SETFROMROTATIONX
(MATTOMUTATE MAT3) (ANGLE SINGLEFLOAT)
)
Destructively updates of the components of the given mat3
making
it a matrix which would rotate a point around the x axis by the
specified amount
(
SETFROMROTATIONY
(MATTOMUTATE MAT3) (ANGLE SINGLEFLOAT)
)
Destructively updates of the components of the given mat3
making
it a matrix which would rotate a point around the y axis by the
specified amount
(
SETFROMROTATIONZ
(MATTOMUTATE MAT3) (ANGLE SINGLEFLOAT)
)
Destructively updates of the components of the given mat3
making
it a matrix which would rotate a point around the z axis by the
specified amount
(
SETFROMROWS
(MATTOMUTATE MAT3) (ROW1 VEC3) (ROW2 VEC3) (ROW3 VEC3)
)
(
SETFROMSCALE
(MATTOMUTATE MAT3) (SCALEVEC3 VEC3)
)
Mutates the given mat3
to be a matrix which will scale by the amounts
specified
(
SETROTATIONFROMAXISANGLE
(MATTOMUTATE MAT3) (AXIS3 VEC3) (ANGLE SINGLEFLOAT)
)
Destructively updates of the components of the given mat3
making
it a matrix which will rotate a point about the axis specified by
the angle provided
(
SETROTATIONFROMEULER
(MATTOMUTATE MAT3) (VEC3A VEC3)
)
(
TRANSPOSE
(MATTOTRANSPOSE MAT3)
)
Mutates the given mat3
to be it's own transpose
(
*
(ACCUMMAT MAT4) &REST (MAT4S MAT4)
)
(
*S
(MATTOMUTATE MAT4) (SCALAR SINGLEFLOAT)
)
Destructively performs componentwise multiplication of the vec3
by
the scalar
(
*V
(MATA MAT4) (VEC4TOMUTATE VEC4)
)
(
*V3
(MATA MAT4) (VEC3TOMUTATE VEC3)
)
(
+
(MATACCUM MAT4) (MATB MAT4)
)
Add the second mat4
component wise to the first and return
the first
(

(MATACCUM MAT4) (MATB MAT4)
)
Subtracts the second mat4
component wise from the first and return
the first
(
ADJOINT
(MATTOMUTATE MAT4)
)
Mutates the given mat4
to be it's own adjoint
(
AFFINEINVERSE
(MATTOINVERT MAT4)
)
Mutates the given mat4
to be it's own inverse
(
MROW*VEC4
(VEC4TOMUTATE VEC4) (MATA MAT4)
)
{TODO}
(
NEGATE
(MATTONEGATE MAT4)
)
Negates the components of the mat4
(
SETCOMPONENTS
(C00 SINGLEFLOAT) (C01 SINGLEFLOAT) (C02 SINGLEFLOAT) (C03 SINGLEFLOAT)
(C10 SINGLEFLOAT) (C11 SINGLEFLOAT) (C12 SINGLEFLOAT) (C13 SINGLEFLOAT)
(C20 SINGLEFLOAT) (C21 SINGLEFLOAT) (C22 SINGLEFLOAT) (C23 SINGLEFLOAT)
(C30 SINGLEFLOAT) (C31 SINGLEFLOAT) (C32 SINGLEFLOAT) (C33 SINGLEFLOAT)
(MAT4TOMUTATE MAT4)
)
Destructively updates of the components of the given mat4
to the new singlefloat
s provided.
(
SETFROMCOLUMNS
(MATTOMUTATE MAT4) (COL1 VEC4) (COL2 VEC4) (COL3 VEC4) (COL4 VEC4)
)
(
SETFROMCOLUMNSV3
(MATTOMUTATE MAT4) (COL1 VEC3) (COL2 VEC3) (COL3 VEC3)
)
(
SETFROMMAT3
(MATTOMUTATE MAT4) (MA MAT3)
)
(
SETFROMROTATIONX
(MATTOMUTATE MAT4) (ANGLE SINGLEFLOAT)
)
Destructively updates of the components of the given mat4
making
it a matrix which would rotate a point around the x axis by the
specified amount
(
SETFROMROTATIONY
(MATTOMUTATE MAT4) (ANGLE SINGLEFLOAT)
)
Destructively updates of the components of the given mat4
making
it a matrix which would rotate a point around the y axis by the
specified amount
(
SETFROMROTATIONZ
(MATTOMUTATE MAT4) (ANGLE SINGLEFLOAT)
)
Destructively updates of the components of the given mat4
making
it a matrix which would rotate a point around the z axis by the
specified amount
(
SETFROMROWS
(MATTOMUTATE MAT4) (ROW1 VEC4) (ROW2 VEC4) (ROW3 VEC4) (ROW4 VEC4)
)
(
SETFROMROWSV3
(MATTOMUTATE MAT4) (ROW1 VEC3) (ROW2 VEC3) (ROW3 VEC3)
)
(
SETFROMSCALE
(MATTOMUTATE MAT4) (SCALEVEC3 VEC3)
)
Mutates the given mat4
to be a matrix which will scale by the amounts
specified
(
SETFROMTRANSLATION
(MATTOMUTATE MAT4) (VECA (SIMPLEARRAY SINGLEFLOAT))
)
Destructively updates of the components of the given mat4
making
it a matrix which which will translate a point by the specified amount
(
SETROTATIONFROMAXISANGLE
(MATTOMUTATE MAT4) (AXIS3 VEC3) (ANGLE SINGLEFLOAT)
)
Destructively updates of the components of the given mat4
making
it a matrix which will rotate a point about the axis specified by
the angle provided
(
SETROTATIONFROMEULER
(MATTOMUTATE MAT4) (VEC3A VEC3)
)
(
TRANSPOSE
(MATTOTRANSPOSE MAT4)
)
Mutates the given mat4
to be it's own transpose
(
*
MATRIXA MATVECORSCALAR
)
Takes any number of matrices (of the same kind) and multiplies them together returning a new matrix of the same kind.
(
+
&REST MATRICES
)
Takes any number of matrices (of the same kind) and performs componentwise addition them together returning a new matrix of the same kind.
(

&REST MATRICES
)
Takes any number of matrices (of the same kind) and performs componentwise negation of them returning a new matrix of the same kind.
(
/=
&REST MATRICES
)
Returns either t if the matrices are equal. Otherwise it returns nil.
(
0P
MATRIX
)
Returns T if all the components of the matrix =
0
(
1+
MATRIXA MATRIXB
)
Returns a new matrix which is equal to the given matrix with every component incremented by 1
(
1
MATRIXA MATRIXB
)
Returns a new matrix which is equal to the given matrix with every component decremented by 1
(
=
&REST MATRICES
)
Returns either t if the matrices are equal. Otherwise it returns nil.
(
AFFINEINVERSE
MATRIXA
)
Returns a new matrix which is the inverse of the one given.
(
DETERMINANT
MATRIXA
)
Returns the determinant of the given matrix
(
ELM
MATRIX ROW COL
)
DEPRECATED: Please use melm
(
ELT
MATRIX ROW COL
)
DEPRECATED: Please use melm
(
GETCOLUMN
MATRIXA COLNUM
)
Returns the specifed column of the matrix as vector
(
GETCOLUMNS
MATRIXA
)
Returns the columns of the matrix as a list of vectors
(
GETROW
MATRIXA ROWNUM
)
Returns the specifed row of the matrix as vector
(
GETROWS
MATRIXA
)
Returns the rows of the matrix as a list of vectors
(
INVERSE
MATRIXA
)
Returns the inverse of the given matrix
(
NEGATE
MATRIXA
)
Returns a fresh matrix with all the components negated
(
TOSTRING
MAT
)
{TODO}
(
TRACE
MATRIXA
)
Returns the trace of the given matrix as a vector
(
TRANSPOSE
MATRIXA
)
Returns the transpose of the given matrix
(
UNITP
MATRIX
)
Returns T if the matrix is the unit matrix.
(
*
(QUATA QUATERNION) (QUATB QUATERNION)
)
Multiplies (and thus combines) the two quaternion
s given, returning a
new quaternion
(
*S
(QUATA QUATERNION) (SCALAR SINGLEFLOAT)
)
Componentwise multiplication of the quaternion
by the scalar
(
+
&REST (QUATS QUATERNION)
)
Componentwise addition of any number of quaternions.
(

(QUAT QUATERNION) &REST (QUATS QUATERNION)
)
Takes any number of quaternion
and performs componentwise subtraction on
them returning a new quaternion
(
/=
(Q1 QUATERNION) (Q2 QUATERNION)
)
Componentwise comparison of two quaternions. Returns T if any components are not equal (by =)
(
0!
)
Returns a new quaternion
where every component is 0
(
0P
(QUAT QUATERNION)
)
Returns T if all the components of the given quaternion
are 0
(
=
(Q1 QUATERNION) (Q2 QUATERNION)
)
Returns T if the two quaternion
s given are componentwise equal (by cl:=)
(
APPROXSLERP
(STARTQUAT QUATERNION) (ENDQUAT QUATERNION) (POS SINGLEFLOAT)
)
A faster and less accurate version of slerp
for quaternions
(
CONJUGATE
(QUAT QUATERNION)
)
Returns the conjugate of the given quaternion
(
COPY
(QUAT QUATERNION)
)
Returns a fresh quaternion
which is = to the one given
(
DOT
(QUATA QUATERNION) (QUATB QUATERNION)
)
return the dot product of the quata and quatb.
(
FROMAXIES
(XAXIES VEC3) (YAXIES VEC3) (ZAXIES VEC3)
)
{TODO}
(
FROMAXISANGLE
(AXISVEC3 VEC3) (ANGLE SINGLEFLOAT)
)
Returns a new quaternion
which represents a rotation around the given
axis by the given angle
(
FROMDIRECTION
(UP3 VEC3) (DIR3 VEC3)
)
Creates a quaternion
that would rotate the vector (v! 0 0 1) to face in the
given direction.
(
FROMFIXEDANGLES
(XROT SINGLEFLOAT) (YROT SINGLEFLOAT) (ZROT SINGLEFLOAT)
)
Creates a quaternion
that represents a rotation around the given axies by the
given angles
(
FROMFIXEDANGLESV3
(ANGLES VEC3)
)
Creates a quaternion
that represents a rotation around the given axies by the
angles given in the vec3
(
FROMMAT3
(MAT3 MAT3)
)
Creates quaternion
that represents the same rotation the mat3
does.
(
GETAXISANGLE
(QUAT QUATERNION)
)
Gets one possible axisangle pair that will generate this quaternion
Assumes that this is a normalized quaternion. It is critical that this is true as otherwise you will at best get a runtime error, and most likely a silently incorrect result.
(
IDENTITY
)
Returns a fresh identity quaternion
(
IDENTITYP
(QUAT QUATERNION)
)
Returns T if the given quaternion
is the identity quaternion
(
INVERSE
(QUAT QUATERNION)
)
Returns a new quaternion
that is the inverse of the one given
(
LERP
(STARTQUAT QUATERNION) (ENDQUAT QUATERNION) (POS SINGLEFLOAT)
)
Linearaly interpolate between two quaternions. Note that this will always take the shortest path.
(
LOOKAT
(UP3 VEC3) (FROM3 VEC3) (TO3 VEC3)
)
Creates a quaternion
that would rotate the vector (v! 0 0 1) to point in
the direction from from3
to to3
(
MAGNITUDE
(QUAT QUATERNION)
)
Returns the magnitude of the quaternion
(
MAKE
(W SINGLEFLOAT) (X SINGLEFLOAT) (Y SINGLEFLOAT) (Z SINGLEFLOAT)
)
Make a quaternion
from 4 singlefloat
s
(
NORM
(QUAT QUATERNION)
)
Returns the 'norm' of the quaternion
Note: This is not the normalized verison of the quaternion, that is performed
by the normalize
function.
(
NORMALIZE
(QUAT QUATERNION)
)
Returns a fresh, normalized version of the given vector.
(
POINTAT
(UP3 VEC3) (FROM3 VEC3) (TO3 VEC3)
)
Creates a quaternion
that
(
Q!
(W SINGLEFLOAT) (X SINGLEFLOAT) (Y SINGLEFLOAT) (Z SINGLEFLOAT)
)
Make a quaternion
from 4 singlefloat
s
(
QCONJUGATE
(QUAT QUATERNION)
)
Deprecated: Please use conjugate
(
ROTATE
(VEC3 VEC3) (QUAT QUATERNION)
)
Rotates the given vec3
using the quaternion
.
Assumes the quaternion
is normalized.
(
SLERP
(STARTQUAT QUATERNION) (ENDQUAT QUATERNION) (POS SINGLEFLOAT)
)
Spherically interpolate between two quaternions. Note that this will always take the shortest path.
(
TODIRECTION
(QUAT QUATERNION)
)
Returns a new vec3
is equal to (v! 0 0 1)
having been rotated by the
given quaternion
(
TODIRECTIONVEC4
(QUAT QUATERNION)
)
Returns a new vec4
is equal to (v! 0 0 1 0)
having been rotated by the
given quaternion
(
TOMAT3
(QUAT QUATERNION)
)
Returns a new mat3
which represents the same rotation as the given quaternion
(
TOMAT4
(QUAT QUATERNION)
)
Returns a new mat4
which represents the same rotation as the given quaternion
(and zero translation)
(
UNITP
(QUAT QUATERNION)
)
Returns T if this is a unit quaternion.
(
W
(QUAT QUATERNION)
)
Returns the w component of the quaternion
(
X
(QUAT QUATERNION)
)
Returns the x component of the quaternion
(
Y
(QUAT QUATERNION)
)
Returns the y component of the quaternion
(
Z
(QUAT QUATERNION)
)
Returns the z component of the quaternion
(
*
(QUATTOMUTATE QUATERNION) (QUATB QUATERNION)
)
Destructively multiplies (and thus combines) the second quaternion
into the
first.
(
+
(ACCUMQUAT QUATERNION) &REST (QUATERNIONS QUATERNION)
)
Destructively performs componentwise addition of the quaternion
s, the
first quaternion
is mutated.
(

(ACCUMQUAT QUATERNION) &REST (QUATERNIONS QUATERNION)
)
Destructively performs componentwise substraction of the quaternion
s, the
first quaternion
is mutated.
(
CONJUGATE
(QUATTOMUTATE QUATERNION)
)
Destructively replaces the given quaternion
with it's conjugate
(
FROMAXISANGLE
(QUATTOMUTATE QUATERNION) (AXISVEC3 VEC3) (ANGLE SINGLEFLOAT)
)
Turns the given quaternion
into one which represents a rotation around the
given axis by the given angle
(
FROMFIXEDANGLES
(QUATTOMUTATE QUATERNION) (XROT SINGLEFLOAT) (YROT SINGLEFLOAT)
(ZROT SINGLEFLOAT)
)
Turns the given quaternion
into one which represents a rotation around the
given axies by the given angles.
(
FROMMAT3
(QUATTOMUTATE QUATERNION) (MAT3 MAT3)
)
Destructively updates of the components of the given quaternion
making
it represent the rotation from the given mat3
.
Assumes that this is a rotation matrix. It is critical that this is true (and elements are between 1f0 and 1f0) as otherwise you will at best get a runtime error, and most likely a silently incorrect result.
(
NORMALIZE
(QUATTOMUTATE QUATERNION)
)
Destructively replaces the given quaternion
with the normalized version of
itself.
(
ROTATE
(VEC3TOMUTATE VEC3) (QUAT QUATERNION)
)
Destructively rotates the vec3
using the quaternion
returning the
mutated vec3
.
ssumes quaternion is normalized.
(
TOMAT3
(MATTOMUTATE MAT3) (QUAT QUATERNION)
)
Given a quaternion
and a mat3
to mutate this function will mutate the mat3
such that it represents the same rotation as the quaternion
does.
(
TOMAT4
(MATTOMUTATE MAT4) (QUAT QUATERNION)
)
Given a quaternion
and a mat4
to mutate this function will mutate the mat4
such that it represents the same rotation as the quaternion
does.
(
CARTESIAN>POLAR
VEC2
)
Takes a polar coord vector with the layout (θ r) and and converts it to
a cartesian vec2
Notes: r  length of υ θ  angle between υ and y axis θ>0 means counterclockwise rotation
(
POLAR>CARTESIAN
ANGLELENGTHV2
)
(
CARTESIAN>SPHERICAL
VEC3
)
Takes a cartesian vector3 and converts it to a spherical coord vector with the layout (θ φ ρ).
Notes: θ  angle between υ and x axis (rotating around z) φ  angle between υ and z axis ρ  distance from origin (lengh of υ)
(
SPHERICAL>CARTESIAN
SPHERICALCOORDV3
)
Takes a spherical coord vector with the layout (θ φ ρ) and converts it to a cartesian vector3.
Notes: θ  angle between υ and x axis (rotating around z) φ  angle between υ and z axis ρ  distance from origin (lengh of υ)
(
ORTHOGRAPHIC
(FRAMEWIDTH SINGLEFLOAT) (FRAMEHEIGHT SINGLEFLOAT) (NEAR SINGLEFLOAT)
(FAR SINGLEFLOAT)
)
Creates a new orthographic projection matrix (mat4)
(
ORTHOGRAPHICV2
(FRAMESIZEV2 VEC2) (NEAR SINGLEFLOAT) (FAR SINGLEFLOAT)
)
Creates a new orthographic projection matrix (mat4) with the frame size
specified by a vec2
(
PERSPECTIVE
(WIDTH SINGLEFLOAT) (HEIGHT SINGLEFLOAT) (NEAR SINGLEFLOAT)
(FAR SINGLEFLOAT) (FOVDEGREES SINGLEFLOAT)
)
Creates a perspective matrix (mat4
) with the field of view being
specified in degrees.
The fact that the primary function form takes degress is unusual
in rtgmath. We keep it this way for backwards compatibility. For
the version specified in radians see perspectiveradianfov
(
PERSPECTIVERADIANFOV
(WIDTH SINGLEFLOAT) (HEIGHT SINGLEFLOAT) (NEAR SINGLEFLOAT)
(FAR SINGLEFLOAT) (FOV SINGLEFLOAT)
)
Creates a perspective matrix (mat4
).
(
PERSPECTIVEV2
(FRAMESIZEV2 VEC2) (NEAR SINGLEFLOAT) (FAR SINGLEFLOAT)
(FOVDEGREES SINGLEFLOAT)
)
Creates a perspective matrix (mat4
) with the frame size specified using a vec2
and the field of view being specified in degrees.
This variant of perspective
that is provided as some libraries will provide
the framesize as a vec2
so it felt right to support that rather
that force unpacking.
The fact that the primary function form takes degress is unusual
in rtgmath. We keep it this way for backwards compatibility. For
the version specified in radians see perspectiveradianfov
(
PERSPECTIVEV2RADIANFOV
(FRAMESIZEV2 VEC2) (NEAR SINGLEFLOAT) (FAR SINGLEFLOAT)
(FOVDEGREES SINGLEFLOAT)
)
Creates a perspective matrix (mat4
) with the frame size specified using
a vec2
This variant of perspective
that is provided as some libraries will provide
the framesize as a vec2
so it felt right to support that rather
that force unpacking.
(
ORTHOGRAPHIC
(MAT4TOMUTATE MAT4) (FRAMEWIDTH SINGLEFLOAT) (FRAMEHEIGHT SINGLEFLOAT)
(NEAR SINGLEFLOAT) (FAR SINGLEFLOAT)
)
Creates a mat4
and mutates it to be an orthographic projection matrix
(
ORTHOGRAPHICV2
(MAT4TOMUTATE MAT4) (FRAMESIZEV2 VEC2) (NEAR SINGLEFLOAT)
(FAR SINGLEFLOAT)
)
(
PERSPECTIVE
(MATTOMUTATE MAT4) (WIDTH SINGLEFLOAT) (HEIGHT SINGLEFLOAT)
(NEAR SINGLEFLOAT) (FAR SINGLEFLOAT) (FOVDEGREES SINGLEFLOAT)
)
Takes a mat4
and mutates it to be a perspective matrix with the field of view
being specified in degrees.
The fact that the primary function form takes degress is unusual
in rtgmath. We keep it this way for backwards compatibility. For
the version specified in radians see perspectiveradianfov
(
PERSPECTIVERADIANFOV
(MATTOMUTATE MAT4) (WIDTH SINGLEFLOAT) (HEIGHT SINGLEFLOAT)
(NEAR SINGLEFLOAT) (FAR SINGLEFLOAT) (FOV SINGLEFLOAT)
)
Takes a mat4
and mutates it to be a perspective matrix
(
PERSPECTIVEV2
(MATTOMUTATE MAT4) (FRAMESIZEV2 VEC2) (NEAR SINGLEFLOAT)
(FAR SINGLEFLOAT) (FOVDEGREES SINGLEFLOAT)
)
Takes a mat4
and mutates it to be a perspective matrix with the frame size
specified using a vec2
and the field of view being specified in degrees.
This variant of perspective
that is provided as some libraries will provide
the framesize as a vec2
so it felt right to support that rather
that force unpacking.
The fact that the primary function form takes degress is unusual
in rtgmath. We keep it this way for backwards compatibility. For
the version specified in radians see perspectiveradianfov
(
PERSPECTIVEV2RADIANFOV
(MATTOMUTATE MAT4) (FRAMESIZEV2 VEC2) (NEAR SINGLEFLOAT)
(FAR SINGLEFLOAT) (FOVDEGREES SINGLEFLOAT)
)
Takes a mat4
and mutates it to be a perspective matrix with the frame size
specified using a vec2
This variant of perspective
that is provided as some libraries will provide
the framesize as a vec2
so it felt right to support that rather
that force unpacking.
LINE3
(
CLOSESTLINEPOINTS
(LINE3A LINE3) (LINE3B LINE3)
)
(
CLOSESTPOINT
(LINE3 LINE3) (POINTV3 VEC3)
)
(
DIRECTION
(LINE3 LINE3)
)
(
DISTANCESQUAREDTOLINE3
(LINE3A LINE3) (LINE3B LINE3)
)
(
DISTANCESQUAREDTOPOINT
(LINE3 LINE3) (POINTV3 VEC3)
)
(
DISTANCETOLINE3
(LINE3A LINE3) (LINE3B LINE3)
)
(
DISTANCETOPOINT
(LINE3 LINE3) (POINTV3 VEC3)
)
(
MAKE
(ORIGINV3 VEC3) (DIRECTIONV3 VEC3)
)
(
ORIGIN
(LINE3 LINE3)
)
(
TRANSFORMM3
(MATRIX3 MAT3) (LINE3 LINE3)
)
(
TRANSFORMQ
(QUAT QUATERNION) (LINE3 LINE3)
)
RAY3
(
/=
(RAY3A RAY3) (RAY3B RAY3)
)
(
=
(RAY3A RAY3) (RAY3B RAY3)
)
(
CLOSESTPOINT
(RAY3 RAY3) (POINTV3 VEC3)
)
(
CLOSESTRAYPOINTS
(RAY3A RAY3) (RAY3B RAY3)
)
(
DIRECTION
(RAY3 RAY3)
)
(
DISTANCESQUAREDTOLINE3
(RAY3 RAY3) (LINE3 LINE3)
)
(
DISTANCESQUAREDTOPOINT
(RAY3 RAY3) (POINTV3 VEC3)
)
(
DISTANCESQUAREDTORAY3
(RAY3A RAY3) (RAY3B RAY3)
)
(
DISTANCETOLINE3
(RAY3 RAY3) (LINE3 LINE3)
)
(
DISTANCETOPOINT
(RAY3 RAY3) (POINTV3 VEC3)
)
(
DISTANCETORAY3
(RAY3A RAY3) (RAY3B RAY3)
)
(
MAKE
(ORIGINV3 VEC3) (DIRECTIONV3 VEC3)
)
(
ORIGIN
(RAY3 RAY3)
)
(
TRANSFORMM3
(MATRIX3 MAT3) (RAY3 RAY3)
)
(
TRANSFORMQ
(QUAT QUATERNION) (RAY3 RAY3)
)
(
/=
(LINESEG3A LINESEGMENT3) (LINESEG3B LINESEGMENT3)
)
(
=
(LINESEG3A LINESEGMENT3) (LINESEG3B LINESEGMENT3)
)
(
CLOSESTLINEPOINTS
(LINESEG3 LINESEGMENT3) (LINE3 LINE3)
)
(
CLOSESTLINESEGMENTPOINTS
(LINESEGA LINESEGMENT3) (LINESEGB LINESEGMENT3)
)
(
CLOSESTPOINT
(LINESEG3 LINESEGMENT3) (POINTV3 VEC3)
)
(
CLOSESTRAYPOINTS
(LINESEGA LINESEGMENT3) (RAY3 RAY3)
)
(
DIRECTION
(LINESEG3 LINESEGMENT3)
)
(
DISTANCESQUAREDTOLINESEG3
(LINESEGA LINESEGMENT3) (LINESEGB LINESEGMENT3)
)
(
DISTANCESQUAREDTOLINE3
(LINESEG3 LINESEGMENT3) (LINE3 LINE3)
)
(
DISTANCESQUAREDTOPOINT
(LINESEG3 LINESEGMENT3) (POINTV3 VEC3)
)
(
DISTANCESQUAREDTORAY3
(LINESEG3 LINESEGMENT3) (RAY3 RAY3)
)
(
DISTANCETOLINESEG3
(LINESEGA LINESEGMENT3) (LINESEGB LINESEGMENT3)
)
(
DISTANCETOLINE3
(LINESEG3 LINESEGMENT3) (LINE3 LINE3)
)
(
DISTANCETOPOINT
(LINESEG3 LINESEGMENT3) (POINTV3 VEC3)
)
(
DISTANCETORAY3
(LINESEG3 LINESEGMENT3) (RAY3 RAY3)
)
(
ENDPOINT0
(LINESEG3 LINESEGMENT3)
)
(
ENDPOINT1
(LINESEG3 LINESEGMENT3)
)
(
LENGTH
(LINESEG3 LINESEGMENT3)
)
(
LENGTHSQUARED
(LINESEG3 LINESEGMENT3)
)
(
MAKE
(ENDPOINT0 VEC3) (ENDPOINT1 VEC3)
)
(
MAKEFROMPOINTOFFSET
(POINTV3 VEC3) (OFFSETV3 VEC3)
)
(
TRANSFORMM3
(MATRIX3 MAT3) (LINESEG3 LINESEGMENT3)
)
(
TRANSFORMQ
(QUAT QUATERNION) (LINESEG3 LINESEGMENT3)
)
(
MERGEPOINT
(AAB AXISALIGNEDBOX) (POINTV3 VEC3)
)
AXISALIGNEDBOX
(
/=
(AAB0 AXISALIGNEDBOX) (AAB1 AXISALIGNEDBOX)
)
(
=
(AAB0 AXISALIGNEDBOX) (AAB1 AXISALIGNEDBOX)
)
(
ADDPOINT
(AAB AXISALIGNEDBOX) (POINTV3 VEC3)
)
(
FROMAABS
&REST (AABS AXISALIGNEDBOX)
)
(
FROMPOINTS
(LISTOFVEC3 LIST)
)
(
INTERSECTSP
(AAB0 AXISALIGNEDBOX) (AAB1 AXISALIGNEDBOX)
)
(
INTERSECTSWITHLINESEGMENTP
(AAB AXISALIGNEDBOX) (LINESEG3 LINESEGMENT3)
)
(
INTERSECTSWITHLINE3P
(AAB AXISALIGNEDBOX) (LINE3 LINE3)
)
(
INTERSECTSWITHRAY3P
(AAB AXISALIGNEDBOX) (RAY3 RAY3)
)
(
MAKE
(MINIMA VEC3) (MAXIMA VEC3)
)
(
MAXIMA
(AAB AXISALIGNEDBOX)
)
(
MINIMA
(AAB AXISALIGNEDBOX)
)
(
CLOSESTPOINT
REGA VEC3
)
(
CLOSESTPOINTS
REGA REGB
)
(
DISTANCE
REGA REGB
)
(
DISTANCESQUARED
REGA REGB
)
(
INTERSECTSP
REGA REGB
)
+INVPI+
(/ 1 pi)
as a singlefloat
. This is the older naming, it is now prefered
to use invpif
+ONEDEGREEINRADIANS+
The number of degrees in 1 radian as a singlefloat
+PI+
pi
as a singlefloat
. This is the older naming, it is now prefered
to use pif
0.5PI
(/ pi 2)
as a doublefloat
0.5PIF
(/ pi 2)
as a singlefloat
2PI
(* PI 2)
as a doublefloat
2PIF
(* PI 2)
as a singlefloat
INVPI
(/ 1 pi) as a
doublefloat`
INVPIF
(/ 1 pi) as a
singlefloat`
PIF
pi
as a singlefloat
(
CLAMP
(MIN SINGLEFLOAT) (MAX SINGLEFLOAT) (VALF SINGLEFLOAT)
)
Force a singlefloat
to be constrained to the given range.
(
DEGREES
RADIANS
)
Converts a quantity, specified in radians into degrees.
(
DEGREESF
RADIANS
)
Converts a quantity, specified in radians as a singlefloat
into degrees.
(
INVSQRT
(X (SINGLEFLOAT 0.0 3.4028235e38))
)
Calculates the inverse square root of a number
(
LERP
(START SINGLEFLOAT) (END SINGLEFLOAT) (AMOUNT SINGLEFLOAT)
)
Performs a linear interpolation between 'start' and 'end' by the
given amount
(
M!
&REST COMPONENTS
)
(
MIX
(START SINGLEFLOAT) (END SINGLEFLOAT) (AMOUNT SINGLEFLOAT)
)
Performs a linear interpolation between 'start' and 'end' by the
given amount
(
Q!
(W SINGLEFLOAT) (X SINGLEFLOAT) (Y SINGLEFLOAT) (Z SINGLEFLOAT)
)
Make a quaternion
from 4 singlefloat
s
(
RADIANS
DEGREES
)
Converts a quantity, specified in degrees into radians.
(
RADIANSF
DEGREES
)
Converts a quantity, specified in degrees as a singlefloat
into radians.
(
SATURATE
(VALF SINGLEFLOAT)
)
clamps the given singlefloat
between 0.0 and 1.0
(
SMOOTHSTEP
(A SINGLEFLOAT) (B SINGLEFLOAT) (X SINGLEFLOAT)
)
Performs smooth Hermite interpolation between 0 and 1 when 'a' < 'x' < 'b'
(
SPLINE
X KNOTS
)
{TODO}
(
S~
VEC PATTERN
)
(
V!
&REST COMPONENTS
)
Create a vec2, vec3 or vec4. The kind of vector returned by this function depends on what is passed as the arguments.
It can take any number of the following..
so long as the total number of components is 2, 3 or 4. So any of the following examples are valid:
(
V!BOOL
&REST COMPONENTS
)
Create a vector of 2, 3 or 4 booleans out of booleans or other boolean vectors
(
V!BYTE
&REST COMPONENTS
)
a vector of 2, 3 or 4 bytes out of bytes or other byte vectors
(
V!DOUBLE
&REST COMPONENTS
)
Create a vector of 2, 3 or 4 doubles out of doubles or other double vectors
(
V!INT
&REST COMPONENTS
)
Create a vector of 2, 3 or 4 ints out of ints or other int vectors
(
V!INT8
&REST COMPONENTS
)
Create a vector of 2, 3 or 4 int8s out of int8s or other int8 vectors
(
V!UBYTE
&REST COMPONENTS
)
Create a vector of 2, 3 or 4 ubytes out of ubytes or other ubyte vectors
(
V!UINT
&REST COMPONENTS
)
Create a vector of 2, 3 or 4 uints out of uints or other uint vectors
(
V!UINT8
&REST COMPONENTS
)
Create a vector of 2, 3 or 4 uint8s out of uint8s or other uint8 vectors
(
V2!
X &OPTIONAL Y
)
Create vec2 from 1 or 2 floats or ints
(
V2!BYTE
X &OPTIONAL Y
)
Create vector of two bytes from 1 or 2 bytes
(
V2!DOUBLE
X &OPTIONAL Y
)
Create vector of two doubles from 1 or 2 doubles
(
V2!INT
X &OPTIONAL Y
)
Create vector of two ints from 1 or 2 ints
(
V2!INT8
X &OPTIONAL Y
)
Create vector of two int8s from 1 or 2 int8s
(
V2!SHORT
X &OPTIONAL Y
)
Create vector of two shorts from 1 or 2 shorts
(
V2!UBYTE
X &OPTIONAL Y
)
Create vector of two ubytes from 1 or 2 ubytes
(
V2!UINT
X &OPTIONAL Y
)
Create vector of two uints from 1 or 2 uints
(
V2!UINT8
X &OPTIONAL Y
)
Create vector of two uint8s from 1 or 2 uint8s
(
V2!USHORT
X &OPTIONAL Y
)
Create vector of two ushorts from 1 or 2 ushorts
(
V3!
X &OPTIONAL Y Z
)
Create a vec3 from 1, 2 or 3 floats or ints.
(
V3!BYTE
X &OPTIONAL Y Z
)
Creates a vector of 3 bytes from 1, 2 or 3 bytes
(
V3!DOUBLE
X &OPTIONAL Y Z
)
Creates a vector of 3 doubles from 1, 2 or 3 doubles
(
V3!INT
X &OPTIONAL Y Z
)
Creates a vector of 3 ints from 1, 2 or 3 ints
(
V3!INT8
X &OPTIONAL Y Z
)
Creates a vector of 3 int8s from 1, 2 or 3 int8s
(
V3!SHORT
X &OPTIONAL Y Z
)
Creates a vector of 3 shorts from 1, 2 or 3 shorts
(
V3!UBYTE
X &OPTIONAL Y Z
)
Creates a vector of 3 ubytes from 1, 2 or 3 ubytes
(
V3!UINT
X &OPTIONAL Y Z
)
Creates a vector of 3 uints from 1, 2 or 3 uints
(
V3!UINT8
X &OPTIONAL Y Z
)
Creates a vector of 3 uint8s from 1, 2 or 3 uint8s
(
V3!USHORT
X &OPTIONAL Y Z
)
Creates a vector of 3 ushorts from 1, 2 or 3 ushorts
(
V4!
X &OPTIONAL Y Z W
)
Create a vec4 from 1, 2, 3 or 4 floats or ints
(
V4!BYTE
X &OPTIONAL Y Z W
)
Creates a vector of 4 bytes from 1, 2, 3 or 4 bytes
(
V4!DOUBLE
X &OPTIONAL Y Z W
)
Creates a vector of 4 doubles from 1, 2, 3 or 4 doubles
(
V4!INT
X &OPTIONAL Y Z W
)
Creates a vector of 4 ints from 1, 2, 3 or 4 ints
(
V4!INT8
X &OPTIONAL Y Z W
)
Creates a vector of 4 int8s from 1, 2, 3 or 4 int8s
(
V4!SHORT
X &OPTIONAL Y Z W
)
Creates a vector of 4 shorts from 1, 2, 3 or 4 shorts
(
V4!UBYTE
X &OPTIONAL Y Z W
)
Creates a vector of 4 ubytes from 1, 2, 3 or 4 ubytes
(
V4!UINT
X &OPTIONAL Y Z W
)
Creates a vector of 4 uints from 1, 2, 3 or 4 uints
(
V4!UINT8
X &OPTIONAL Y Z W
)
Creates a vector of 4 uint8s from 1, 2, 3 or 4 uint8s
(
V4!USHORT
X &OPTIONAL Y Z W
)
Creates a vector of 4 ushorts from 1, 2, 3 or 4 ushorts
(
W
VEC
)
Returns the w component of the vector
(
X
VEC
)
Returns the x component of the vector
(
Y
VEC
)
Returns the y component of the vector
(
Z
VEC
)
Returns the z component of the vector
AXISALIGNEDBOX
LINESEGMENT3
LINE3
RAY3
INT8VEC2
A simplearray
of 2 (signedbyte 8)
s
INT8VEC3
A simplearray
of 3 (signedbyte 8)
s
INT8VEC4
A simplearray
of 4 (signedbyte 8)
s
IVEC2
A simplearray
of 2 (signedbyte 32)
s
IVEC3
A simplearray
of 3 (signedbyte 32)
s
IVEC4
A simplearray
of 4 (signedbyte 32)
s
MAT2
A simplearray
of 4 singlefloat
s
MAT3
A simplearray
of 9 singlefloat
s
MAT4
A simplearray
of 16 singlefloat
s
QUATERNION
UINT8VEC2
A simplearray
of 2 (unsignedbyte 8)
s
UINT8VEC3
A simplearray
of 3 (unsignedbyte 8)
s
UINT8VEC4
A simplearray
of 4 (unsignedbyte 8)
s
UVEC2
A simplearray
of 2 (unsignedbyte 32)
s
UVEC3
A simplearray
of 3 (unsignedbyte 32)
s
UVEC4
A simplearray
of 4 (unsignedbyte 32)
s
VEC2
A simplearray
of 2 singlefloat
s
VEC3
A simplearray
of 3 singlefloat
s
VEC4
A simplearray
of 4 singlefloat
s