mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 02:55:44 +08:00
Ref T259, Ref T243 improvements of PQ
* null() * allow chaining for makePositive * abs()
This commit is contained in:
@@ -193,10 +193,13 @@ namespace BlackMisc
|
||||
bool isNegativeWithEpsilonConsidered() const;
|
||||
|
||||
//! Make value always positive
|
||||
void makePositive();
|
||||
const PQ &makePositive();
|
||||
|
||||
//! Make value always negative
|
||||
void makeNegative();
|
||||
const PQ &makeNegative();
|
||||
|
||||
//! Absolute value (always >=0)
|
||||
PQ abs() const;
|
||||
|
||||
//! \copydoc BlackMisc::Mixin::DBusByMetaClass::marshallToDbus
|
||||
void marshallToDbus(QDBusArgument &argument) const;
|
||||
@@ -240,6 +243,9 @@ namespace BlackMisc
|
||||
//! Minimum of 2 quantities
|
||||
static const PQ &minValue(const PQ &pq1, const PQ &pq2);
|
||||
|
||||
//! NULL PQ
|
||||
static const PQ &null();
|
||||
|
||||
protected:
|
||||
//! Constructor with double
|
||||
CPhysicalQuantity(double value, MU unit);
|
||||
|
||||
Reference in New Issue
Block a user