[PQ] Add unary minus operator

This commit is contained in:
Lars Toenning
2020-07-16 18:37:13 +02:00
parent 74db25ddfc
commit 368dd1f46d
3 changed files with 17 additions and 0 deletions

View File

@@ -237,6 +237,14 @@ namespace BlackMisc
return copy;
}
template <class MU, class PQ>
PQ CPhysicalQuantity<MU, PQ>::operator -() const
{
PQ copy = *derived();
copy *= -1;
return copy;
}
template <class MU, class PQ>
bool CPhysicalQuantity<MU, PQ>::lessThan(const CPhysicalQuantity<MU, PQ> &other) const
{