Implements some missing functions

See merge request oss/rotgen!28
This commit is contained in:
Joel Falcou 2025-09-28 16:15:15 +02:00
parent 5d8a084070
commit b6fcd4b341
34 changed files with 972 additions and 139 deletions

View file

@ -35,10 +35,15 @@
if (this != &o) storage_->data = o.storage_->data;
return *this;
}
CLASSNAME& CLASSNAME::operator=(CLASSNAME&& o)
{
if (this != &o) storage_->data = std::move(o.storage_->data);
return *this;
}
#endif
CLASSNAME::CLASSNAME(CLASSNAME&&) noexcept = default;
CLASSNAME& CLASSNAME::operator=(CLASSNAME&&) noexcept = default;
CLASSNAME::~CLASSNAME() = default;
@ -160,6 +165,13 @@
return result;
}
SOURCENAME CLASSNAME::inverse() const
{
SOURCENAME result;
result.storage()->assign(storage_->data.inverse().eval());
return result;
}
#if !defined(USE_CONST)
void CLASSNAME::normalize()
{
@ -267,18 +279,36 @@
return *this;
}
CLASSNAME& CLASSNAME::operator+=(CLASSCONSTNAME const& rhs)
{
storage_->data += rhs.storage()->data;
return *this;
}
CLASSNAME& CLASSNAME::operator-=(CLASSNAME const& rhs)
{
storage_->data -= rhs.storage_->data;
return *this;
}
CLASSNAME& CLASSNAME::operator-=(CLASSCONSTNAME const& rhs)
{
storage_->data -= rhs.storage()->data;
return *this;
}
CLASSNAME& CLASSNAME::operator*=(CLASSNAME const& rhs)
{
storage_->data *= rhs.storage_->data;
return *this;
}
CLASSNAME& CLASSNAME::operator*=(CLASSCONSTNAME const& rhs)
{
storage_->data *= rhs.storage()->data;
return *this;
}
CLASSNAME& CLASSNAME::operator*=(TYPE s)
{
storage_->data *= s;