M
A utility class providing various mathematical operations for 3x3 and 4x4 matrices, vectors, and rotations.
Functions
Calculate the absolute difference between two angles in radians. This function handles wrap-around.
Concatenates two 3x3 matrices.
Computes the cross product of two 3-dimensional vectors.
Computes the dot product of two float arrays
Computes the dot product of two float arrays with specified offsets and lengths.
Computes the dot product of two 3-dimensional vectors.
Calculate Euler angles between two 3x1 vectors
Transforms eye coordinates to world coordinates using a quaternion.
Sets the elements of a 3x3 matrix to the identity matrix.
Sets the elements of a 4x4 matrix to the identity matrix.
Invert a 4x4 matrix.
Invert a 3x3 matrix.
Perform linear interpolation between two 3x1 vectors.
Performs linear interpolation between two 3x1 vectors.
Converts latitude, longitude, and altitude to world coordinates.
Multiplies each element of a float array by a scalar.
Multiply 3x3 matrices with a vector 3x1.
Multiply two 3x3 matrices.
Multiplies a 3x4 matrix by a 4x1 vector.
Multiplies a 4x4 matrix by a 3x1 vector.
Multiplies a 4x4 matrix by a 4x1 matrix (vector).
Multiply two 4x4 matrices.
Normalizes a vector (any size).
Normalizes a 3x1 vector.
Normalize an angle in radians to the range 0-2pi.
Constructs a perspective projection 4x4 matrix.
Creates a rotate 3x3 matrix.
Convert rotation from axis-angle representation to Euler angles.
Creates a scale and translation 3x3 matrix.
Constructs a scale 4x4 matrix.
Performs spherical linear interpolation between two 3x1 vectors.
Performs spherical linear interpolation between two 3x1 vectors.
Constructs a translation 3x3 matrix.
Constructs a translation 4x4 matrix.
Transposes a 3x3 matrix.
Transposes a 4x4 matrix.
Calculate the angle between two 3x1 vectors.
Transforms world coordinates to eye coordinates using a quaternion.
Converts a 3x3 matrix to a 4x4 matrix with an additional row and column of zeros, and a one in the bottom-right corner.
Sets all elements of a float array to zero.