[ARITHMETIC OPERATORS][IMPLEMENTATION] implmeented the binary, unary and compound - operator

This commit is contained in:
kallore 2025-05-19 10:24:49 +02:00
parent ec63380746
commit 12b867e1c9
3 changed files with 33 additions and 0 deletions

View file

@ -95,6 +95,19 @@ namespace rotgen
return *this;
}
matrix_impl64& matrix_impl64::operator-=(matrix_impl64 const& rhs)
{
storage_->data -= rhs.storage_->data;
return *this;
}
matrix_impl64& matrix_impl64::operator-()
{
matrix_impl64 result(*this);
result.storage_->data = -result.storage_->data;
return result;
}
matrix_impl64& matrix_impl64::operator*=(matrix_impl64 const& rhs)
{
storage_->data *= rhs.storage_->data;