muu/matrix.h file

Contains the definition of muu::matrix.

Namespaces

namespace muu
The root namespace for all muu functions and types.

Classes

template <typename Scalar, size_t Rows, size_t Columns>
struct muu::matrix
A matrix.
template <typename Scalar, size_t Rows, size_t Columns>
struct muu::constants<matrix<Scalar, Rows, Columns>>
Matrix constants.

Enums

enum class math_apis { directx = 0, opengl = 1, right_handed = 0, left_handed = 2 }
Flags relating to math APIs w.r.t some graphics + rendering environments (e.g. DirectX).

Functions

template <typename S, typename T, size_t R, size_t C>
auto approx_equal(const matrix<S, R, C>& m1, const matrix<T, R, C>& m2, epsilon_type<S, T> epsilon = default_epsilon<S, T>) -> bool constexpr noexcept
Returns true if two matrices are approximately equal.
template <typename S, size_t R, size_t C>
auto approx_zero(const matrix<S, R, C>& m, S epsilon = default_epsilon<S>) -> bool constexpr noexcept
Returns true if all the scalar components of a matrix are approximately equal to zero.
template <typename S, size_t R, size_t C>
auto determinant(const matrix<S, R, C>& m) -> determinant_type constexpr noexcept
Calculates the determinant of a matrix.
template <typename S, size_t R, size_t C>
auto infinity_or_nan(const matrix<S, R, C>& m) -> bool constexpr noexcept
Returns true if any of the scalar components of a matrix are infinity or NaN.
template <typename S, size_t R, size_t C>
auto invert(const matrix<S, R, C>& m) -> inverse_type constexpr noexcept
Returns the inverse of a matrix.
template <typename S, size_t R, size_t C>
auto orthonormalize(const matrix<S, R, C>& m) -> matrix<S, R, C> constexpr noexcept
Returns a copy of a matrix with the 3x3 part orthonormalized.
template <typename S, size_t R, size_t C>
auto transpose(const matrix<S, R, C>& m) -> matrix<S, C, R> constexpr noexcept
Returns a transposed copy of a matrix.