mal-math
C++20 mathematics library.
All Classes Namespaces Files Functions Variables Typedefs Concepts
mat.hpp File Reference

Provides matrix definitions tailored for various sizes and primitive types. More...

#include "vec_math.hpp"
#include "matnxn.hpp"
#include "rmatnxn.hpp"
#include "mat_math.hpp"
Include dependency graph for mat.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mal_math
 Contains mathematical utility functions and classes.
 

Typedefs

using mal_math::mat4 = mat<4, 4, float>
 4x4 matrix with float elements.
 
using mal_math::dmat4 = mat<4, 4, double>
 4x4 matrix with double elements.
 
using mal_math::imat4 = mat<4, 4, int>
 4x4 matrix with integer elements.
 
using mal_math::mat4x4 = mat<4, 4, float>
 4x4 matrix with float elements.
 
using mal_math::dmat4x4 = mat<4, 4, double>
 4x4 matrix with double elements.
 
using mal_math::imat4x4 = mat<4, 4, int>
 4x4 matrix with integer elements.
 
using mal_math::mat3 = mat<3, 3, float>
 3x3 matrix with float elements.
 
using mal_math::dmat3 = mat<3, 3, double>
 3x3 matrix with double elements.
 
using mal_math::imat3 = mat<3, 3, int>
 3x3 matrix with integer elements.
 
using mal_math::mat3x3 = mat<3, 3, float>
 3x3 matrix with float elements.
 
using mal_math::dmat3x3 = mat<3, 3, double>
 3x3 matrix with double elements.
 
using mal_math::imat3x3 = mat<3, 3, int>
 3x3 matrix with integer elements.
 
using mal_math::mat2 = mat<2, 2, float>
 2x2 matrix with float elements.
 
using mal_math::dmat2 = mat<2, 2, double>
 2x2 matrix with double elements.
 
using mal_math::imat2 = mat<2, 2, int>
 2x2 matrix with integer elements.
 
using mal_math::mat2x2 = mat<2, 2, float>
 2x2 matrix with float elements.
 
using mal_math::dmat2x2 = mat<2, 2, double>
 2x2 matrix with double elements.
 
using mal_math::imat2x2 = mat<2, 2, int>
 2x2 matrix with integer elements.
 
using mal_math::mat2x3 = mat<2, 3, float>
 2x3 matrix with float elements.
 
using mal_math::dmat2x3 = mat<2, 3, double>
 2x3 matrix with double elements.
 
using mal_math::imat2x3 = mat<2, 3, int>
 2x3 matrix with integer elements.
 
using mal_math::mat3x2 = mat<3, 2, float>
 3x2 matrix with float elements.
 
using mal_math::dmat3x2 = mat<3, 2, double>
 3x2 matrix with double elements.
 
using mal_math::imat3x2 = mat<3, 2, int>
 3x2 matrix with integer elements.
 
using mal_math::mat2x4 = mat<2, 4, float>
 2x4 matrix with float elements.
 
using mal_math::dmat2x4 = mat<2, 4, double>
 2x4 matrix with double elements.
 
using mal_math::imat2x4 = mat<2, 4, int>
 2x4 matrix with integer elements.
 
using mal_math::mat4x2 = mat<4, 2, float>
 4x2 matrix with float elements.
 
using mal_math::dmat4x2 = mat<4, 2, double>
 4x2 matrix with double elements.
 
using mal_math::imat4x2 = mat<4, 2, int>
 4x2 matrix with integer elements.
 
using mal_math::mat3x4 = mat<3, 4, float>
 3x4 matrix with float elements.
 
using mal_math::dmat3x4 = mat<3, 4, double>
 3x4 matrix with double elements.
 
using mal_math::imat3x4 = mat<3, 4, int>
 3x4 matrix with integer elements.
 
using mal_math::mat4x3 = mat<4, 3, float>
 4x3 matrix with float elements.
 
using mal_math::dmat4x3 = mat<4, 3, double>
 4x3 matrix with double elements.
 
using mal_math::imat4x3 = mat<4, 3, int>
 4x3 matrix with integer elements.
 
using mal_math::rmat4 = rmat<4, 4, float>
 4x4 reference matrix to float elements.
 
using mal_math::drmat4 = rmat<4, 4, double>
 4x4 reference matrix to double elements.
 
using mal_math::irmat4 = rmat<4, 4, int>
 4x4 reference matrix to integer elements.
 
using mal_math::rmat4x4 = rmat<4, 4, float>
 4x4 reference matrix to float elements.
 
using mal_math::drmat4x4 = rmat<4, 4, double>
 4x4 reference matrix to double elements.
 
using mal_math::irmat4x4 = rmat<4, 4, int>
 4x4 reference matrix to integer elements.
 
using mal_math::rmat3 = rmat<3, 3, float>
 3x3 reference matrix to float elements.
 
using mal_math::drmat3 = rmat<3, 3, double>
 3x3 reference matrix to double elements.
 
using mal_math::irmat3 = rmat<3, 3, int>
 3x3 reference matrix to integer elements.
 
using mal_math::rmat3x3 = rmat<3, 3, float>
 3x3 reference matrix to float elements.
 
using mal_math::drmat3x3 = rmat<3, 3, double>
 3x3 reference matrix to double elements.
 
using mal_math::irmat3x3 = rmat<3, 3, int>
 3x3 reference matrix to integer elements.
 
using mal_math::rmat2 = rmat<2, 2, float>
 2x2 reference matrix to float elements.
 
using mal_math::drmat2 = rmat<2, 2, double>
 2x2 reference matrix to double elements.
 
using mal_math::irmat2 = rmat<2, 2, int>
 2x2 reference matrix to integer elements.
 
using mal_math::rmat2x2 = rmat<2, 2, float>
 2x2 reference matrix to float elements.
 
using mal_math::drmat2x2 = rmat<2, 2, double>
 2x2 reference matrix to double elements.
 
using mal_math::irmat2x2 = rmat<2, 2, int>
 2x2 reference matrix to integer elements.
 
using mal_math::rmat2x3 = rmat<2, 3, float>
 2x3 reference matrix to float elements.
 
using mal_math::drmat2x3 = rmat<2, 3, double>
 2x3 reference matrix to double elements.
 
using mal_math::irmat2x3 = rmat<2, 3, int>
 2x3 reference matrix to integer elements.
 
using mal_math::rmat3x2 = rmat<3, 2, float>
 3x2 reference matrix to float elements.
 
using mal_math::drmat3x2 = rmat<3, 2, double>
 3x2 reference matrix to double elements.
 
using mal_math::irmat3x2 = rmat<3, 2, int>
 3x2 reference matrix to integer elements.
 
using mal_math::rmat2x4 = rmat<2, 4, float>
 2x4 reference matrix to float elements.
 
using mal_math::drmat2x4 = rmat<2, 4, double>
 2x4 reference matrix to double elements.
 
using mal_math::irmat2x4 = rmat<2, 4, int>
 2x4 reference matrix to integer elements.
 
using mal_math::rmat4x2 = rmat<4, 2, float>
 4x2 reference matrix to float elements.
 
using mal_math::drmat4x2 = rmat<4, 2, double>
 4x2 reference matrix to double elements.
 
using mal_math::irmat4x2 = rmat<4, 2, int>
 4x2 reference matrix to integer elements.
 
using mal_math::rmat3x4 = rmat<3, 4, float>
 3x4 reference matrix to float elements.
 
using mal_math::drmat3x4 = rmat<3, 4, double>
 3x4 reference matrix to double elements.
 
using mal_math::irmat3x4 = rmat<3, 4, int>
 3x4 reference matrix to integer elements.
 
using mal_math::rmat4x3 = rmat<4, 3, float>
 4x3 reference matrix to float elements.
 
using mal_math::drmat4x3 = rmat<4, 3, double>
 4x3 reference matrix to double elements.
 
using mal_math::irmat4x3 = rmat<4, 3, int>
 4x3 reference matrix to integer elements.
 

Detailed Description

Provides matrix definitions tailored for various sizes and primitive types.

Includes math-related matrix functions.

Author
malatindez (Vladyslav Ohlii)
Date
12/09/2023

This header introduces a collection of matrix type definitions varying by dimensions and primitive data types. The base template mat serves as the foundation for these types, resulting in specific aliases such as mat2x3 for a 2x3 float matrix or imat4 for a 4x4 integer matrix.

In addition, a specialized matrix type rmat, which emphasizes reference semantics, is also defined. This type, short for reference matrix, enables efficient interactions with matrix subsets or shared matrix data without actual copying. Aliases for rmat tailored to specific dimensions and types are also provided.

Usage:

mat2x3 a; // Represents a 2x3 matrix of floats
imat4 b; // Denotes a 4x4 matrix of integers
drmat2x2 c; // Describes a 2x2 reference matrix of doubles

For intricate matrix operations and manipulations, please refer to "mat_math.hpp".

Definition in file mat.hpp.