[nnm] No Nonsense Math 0.5.0
A No-Nonsense, C++ 17, single-header-only Math library geared towards graphics programming.
|
#include <nnm.hpp>
Public Member Functions | |
constexpr | Matrix2 () |
template<typename Other> | |
constexpr | Matrix2 (const Matrix2< Other > &matrix) |
constexpr | Matrix2 (const Vector2< Real > &column0, const Vector2< Real > &column1) |
constexpr | Matrix2 (const Real col0_row0, const Real col0_row1, const Real col1_row0, const Real col1_row1) |
constexpr Real | trace () const |
constexpr Real | determinant () const |
constexpr Real | minor_at (const uint8_t column, const uint8_t row) const |
constexpr Matrix2 | minor () const |
constexpr Real | cofactor_at (const uint8_t column, const uint8_t row) const |
constexpr Matrix2 | cofactor () const |
constexpr Matrix2 | transpose () const |
constexpr Matrix2 | adjugate () const |
constexpr Matrix2 | unchecked_inverse () const |
constexpr std::optional< Matrix2 > | inverse () const |
constexpr bool | approx_equal (const Matrix2 &other) const |
constexpr bool | approx_zero () const |
constexpr const Vector2< Real > & | at (const uint8_t column) const |
constexpr Vector2< Real > & | at (const uint8_t column) |
constexpr const Real & | at (const uint8_t column, const uint8_t row) const |
constexpr Real & | at (const uint8_t column, const uint8_t row) |
const Real * | begin () const |
const Real * | end () const |
Real * | begin () |
Real * | end () |
constexpr const Vector2< Real > & | operator[] (const uint8_t column) const |
constexpr Vector2< Real > & | operator[] (const uint8_t column) |
constexpr bool | operator== (const Matrix2 &other) const |
constexpr bool | operator!= (const Matrix2 &other) const |
constexpr Matrix2 | operator+ (const Matrix2 &other) const |
constexpr Matrix2 & | operator+= (const Matrix2 &other) |
constexpr Matrix2 | operator- (const Matrix2 &other) const |
constexpr Matrix2 & | operator-= (const Matrix2 &other) |
constexpr Matrix2 | operator* (const Matrix2 &other) const |
constexpr Matrix2 & | operator*= (const Matrix2 &other) |
constexpr Vector2< Real > | operator* (const Vector2< Real > &vector) const |
constexpr Matrix2 | operator* (const Real value) const |
constexpr Matrix2 & | operator*= (const Real value) |
constexpr Matrix2 | operator/ (const Real value) const |
constexpr Matrix2 & | operator/= (const Real value) |
constexpr bool | operator< (const Matrix2 &other) const |
constexpr | operator bool () const |
Static Public Member Functions | |
static constexpr Matrix2 | all (const Real value) |
static constexpr Matrix2 | zero () |
static constexpr Matrix2 | one () |
static constexpr Matrix2 | identity () |
Public Attributes | |
Vector2< Real > | columns [2] |
2x2 matrix.
Real | Floating-point type. |
|
inlineconstexpr |
Initialize with identity matrix.
|
inlineexplicitconstexpr |
Cast from another matrix type.
Other | Other matrix type. |
matrix | Matrix to cast from. |
|
inlineconstexpr |
Initialize with columns
column0 | First column |
column1 | Second column |
|
inlineconstexpr |
Initialize with elements
col0_row0 | First column, first row |
col0_row1 | First column, second row |
col1_row0 | Second column, first row |
col1_row1 | Second column, second row |
|
inlinenodiscardconstexpr |
Adjugate matrix.
|
inlinestaticnodiscardconstexpr |
Matrix with all elements equal to value.
value | Value. |
|
inlinenodiscardconstexpr |
Element-wise approximate equality.
other | Other matrix. |
|
inlinenodiscardconstexpr |
If all elements are approximately zero.
|
inlineconstexpr |
Reference to column at index.
column | Column. |
|
inlinenodiscardconstexpr |
Constant reference to column at index.
column | Column. |
|
inlineconstexpr |
Reference to element at column and row.
column | Column. |
row | Row. |
|
inlinenodiscardconstexpr |
Constant reference to element at column and row.
column | Column. |
row | Row. |
|
inline |
Start iterator.
|
inlinenodiscard |
Start constant iterator.
|
inlinenodiscardconstexpr |
Cofactor matrix.
|
inlinenodiscardconstexpr |
Cofactor at column and row.
column | Column |
row | Row |
|
inlinenodiscardconstexpr |
Determinant of matrix.
|
inline |
End iterator.
|
inlinenodiscard |
End constant iterator.
|
inlinestaticnodiscardconstexpr |
Identity matrix.
|
inlinenodiscardconstexpr |
Inverse that returns null if the matrix does not have an inverse.
|
inlinenodiscardconstexpr |
Minor matrix.
|
inlinenodiscardconstexpr |
Minor matrix at column and row. This is the element with that particular row and column excluded.
column | Column |
row | Row |
|
inlinestaticnodiscardconstexpr |
Matrix with all elements equal to one.
|
inlineexplicitconstexpr |
Evaluates to false if all elements are zero, true otherwise.
|
inlineconstexpr |
Element-wise inequality.
other | Other matrix. |
|
inlinenodiscardconstexpr |
Matrix multiplication.
other | Other matrix. |
|
inlinenodiscardconstexpr |
Element-wise multiplication with value.
value | Value. |
|
inlinenodiscardconstexpr |
Matrix-vector multiplication.
vector | Vector. |
|
inlineconstexpr |
Matrix multiplication.
other | Other matrix. |
|
inlineconstexpr |
Element-wise multiplication with value.
value | Value. |
|
inlinenodiscardconstexpr |
Element-wise addition.
other | Other matrix. |
|
inlineconstexpr |
Element-wise addition.
other | Other matrix. |
|
inlinenodiscardconstexpr |
Element-wise subtraction.
other | Other matrix. |
|
inlineconstexpr |
Element-wise subtraction.
other | Other matrix. |
|
inlinenodiscardconstexpr |
Element-wise division with value.
value | Value. |
|
inlineconstexpr |
Element-wise division with value.
value | Value. |
|
inlineconstexpr |
Lexicographical comparison between elements.
other | Other matrix. |
|
inlineconstexpr |
Element-wise equality.
other | Other matrix. |
|
inlineconstexpr |
Reference to column at index.
column | Column. |
|
inlineconstexpr |
Constant Reference to column at index.
column | Column. |
|
inlinenodiscardconstexpr |
Sum of the matrix diagonal.
|
inlinenodiscardconstexpr |
Transpose matrix.
|
inlinenodiscardconstexpr |
Inverse without checking if the matrix is singular first.
|
inlinestaticnodiscardconstexpr |
Matrix with all elements equal to zero.
Vector2<Real> nnm::Matrix2< Real >::columns[2] |