1#ifndef LIBSBX_MATH_MATRIX_HPP_
2#define LIBSBX_MATH_MATRIX_HPP_
6#include <libsbx/math/concepts.hpp>
7#include <libsbx/math/vector.hpp>
11template<std::
size_t Columns, std::
size_t Rows, scalar Type>
12requires (Columns > 1u && Rows > 1u)
17 enum class direction : std::uint8_t {
22 inline static constexpr auto columns = Columns;
23 inline static constexpr auto rows = Rows;
25 using value_type = Type;
26 using reference = value_type&;
27 using const_reference =
const value_type&;
28 using size_type = std::size_t;
31 template<scalar Other = value_type>
34 template<scalar Other = value_type>
45 [[nodiscard]]
constexpr auto operator[](size_type index)
noexcept ->
column_type&;
47 [[nodiscard]]
constexpr auto operator[](size_type index)
const noexcept ->
const column_type&;
49 template<scalar Other>
52 template<scalar Other>
55 template<scalar Other>
56 constexpr auto operator*=(Other scalar)
noexcept ->
basic_matrix&;
58 template<scalar Other>
59 constexpr auto operator/=(Other scalar)
noexcept ->
basic_matrix&;
65 template<scalar Other>
68 template<
typename... Args>
71 constexpr static auto identity()
noexcept ->
basic_matrix;
75 std::array<column_type, Columns> _columns;
79template<std::
size_t Columns, std::
size_t Rows, scalar Lhs, scalar Rhs>
82template<std::
size_t Columns, std::
size_t Rows, scalar Lhs, scalar Rhs>
85template<std::
size_t Columns, std::
size_t Rows, scalar Lhs, scalar Rhs>
88template<std::
size_t Columns, std::
size_t Rows, scalar Lhs, scalar Rhs>
91template<std::
size_t Columns, std::
size_t Rows, scalar Lhs, scalar Rhs>
94template<
typename Matrix>
95[[nodiscard]]
constexpr auto from_array(std::span<typename Matrix::value_type, Matrix::columns * Matrix::rows> array) -> Matrix;
99#include <libsbx/math/matrix.ipp>
Definition: matrix.hpp:13
Definition: vector.hpp:22