mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-17 16:28:06 +03:00
LibGfx: Add Matrix::operator+(Matrix const & other)
This commit is contained in:
parent
6aa82f8b0b
commit
95878688a7
Notes:
sideshowbarker
2024-07-17 18:38:54 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/95878688a7 Pull-request: https://github.com/SerenityOS/serenity/pull/15430 Reviewed-by: https://github.com/LucasChollet
@ -84,6 +84,16 @@ public:
|
||||
return product;
|
||||
}
|
||||
|
||||
constexpr Matrix operator+(Matrix const& other) const
|
||||
{
|
||||
Matrix sum;
|
||||
for (size_t i = 0; i < N; ++i) {
|
||||
for (size_t j = 0; j < N; ++j)
|
||||
sum.m_elements[i][j] = m_elements[i][j] + other.m_elements[i][j];
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
constexpr Matrix operator/(T divisor) const
|
||||
{
|
||||
Matrix division;
|
||||
|
Loading…
Reference in New Issue
Block a user