mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
[PQ] Add unary minus operator
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user