Expand description
Matrix math types and functions.
Traits§
- Matrix
- Matrix trait which defines the basic operations that can be performed on a matrix. Lambda currently implements this trait for f32 arrays of arrays for any size.
Functions§
- filled_
matrix - Creates a new matrix with the given number of rows and columns, and fills it with the given value.
- identity_
matrix - Creates an identity matrix of the given size.
- perspective_
matrix - Creates a 4x4 perspective matrix given the fov in turns (unit between 0..2pi radians), aspect ratio, near clipping plane (also known as z_near), and far clipping plane (also known as z_far). Enforces that the matrix being created is square in both debug and release builds, but only enforces that the output matrix is 4x4 in debug builds.
- rotate_
matrix - Rotates the input matrix by the given number of turns around the given axis. The axis must be a unit vector and the turns must be in the range [0, 1). The rotation is counter-clockwise when looking down the axis.
- submatrix
- Obtain the submatrix of the input matrix starting from the given row & column.
- translation_
matrix - Creates a translation matrix with the given translation vector. The output vector
- zeroed_
matrix - Create a matrix of any size that is filled with zeros.