mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 06:04:57 +00:00
LibGfx: Add an indexing operator to Matrix
This commit is contained in:
parent
9e502dcfe4
commit
44afc8678d
1 changed files with 4 additions and 0 deletions
|
@ -60,6 +60,10 @@ public:
|
|||
constexpr auto elements() const { return m_elements; }
|
||||
constexpr auto elements() { return m_elements; }
|
||||
|
||||
// FIXME: Change to multi-arg operator[] once we upgrade to C++23
|
||||
constexpr auto const& operator()(size_t row, size_t col) const { return m_elements[row][col]; }
|
||||
constexpr auto& operator()(size_t row, size_t col) { return m_elements[row][col]; }
|
||||
|
||||
[[nodiscard]] constexpr Matrix operator*(Matrix const& other) const
|
||||
{
|
||||
Matrix product;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue