mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 19:35:33 +08:00
Implemented commutative multiplications as friends in the templates, further test cases (unit tests), fixed Doxygen attributes, renamed test classes
This commit is contained in:
@@ -219,7 +219,7 @@ public:
|
||||
qint32 convertedSiValueToInteger() const
|
||||
{
|
||||
return static_cast<qint32>(
|
||||
BlackMisc::Math::CMath::round(this->m_convertedSiUnitValueD, 0));
|
||||
BlackMisc::Math::CMath::round(this->m_convertedSiUnitValueD, 0));
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -257,11 +257,11 @@ public:
|
||||
*/
|
||||
void substractUnitValue(double value);
|
||||
|
||||
/*!
|
||||
* \brief Multiply operator *=
|
||||
* \param multiply
|
||||
* \return
|
||||
*/
|
||||
/*!
|
||||
* \brief Multiply operator *=
|
||||
* \param multiply
|
||||
* \return
|
||||
*/
|
||||
CPhysicalQuantity &operator *=(double multiply);
|
||||
|
||||
/*!
|
||||
@@ -278,6 +278,17 @@ public:
|
||||
*/
|
||||
PQ operator *(double multiply) const;
|
||||
|
||||
/*!
|
||||
* \brief Operator to support commutative multiplication
|
||||
* \param factor
|
||||
* \param otherQuantity
|
||||
* \return
|
||||
*/
|
||||
friend PQ operator *(double factor, const PQ &otherQuantity)
|
||||
{
|
||||
return otherQuantity * factor;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Operator /
|
||||
* \param divide
|
||||
|
||||
Reference in New Issue
Block a user