33template <
typename Type, std::
size_t rows, std::
size_t columns>
60 static_assert(rows == columns,
"Matrix must be symmetrical!");
64 for (
size_t i = 0; i < rows; ++i)
66 result.
At(i, i) =
static_cast<Type
>(value);
A class template for a two-dimensional array.
constexpr Array2D()
Default constructor that initializes the array with default values.
constexpr Type & At(std::size_t row, std::size_t col)
Accesses the element at the specified row and column.
A class template for a two-dimensional matrix.
static Matrix Identity()
Creates and returns an identity matrix.
static Matrix Diagonal(const Type &value)
Constructs a uniform diagonal matrix.