Added Quantity::operator>(...).
This commit is contained in:
parent
75dab66916
commit
8ec6b3493d
|
@ -79,6 +79,14 @@ bool Quantity::operator <(const Quantity& that) const
|
|||
return (this->_Value < that._Value) ;
|
||||
}
|
||||
|
||||
bool Quantity::operator >(const Quantity& that) const
|
||||
{
|
||||
if(this->_Unit != that._Unit)
|
||||
throw Base::Exception("Quantity::operator >(): quantities need to have same unit to compare");
|
||||
|
||||
return (this->_Value > that._Value) ;
|
||||
}
|
||||
|
||||
Quantity Quantity::operator *(const Quantity &p) const
|
||||
{
|
||||
return Quantity(this->_Value * p._Value,this->_Unit * p._Unit);
|
||||
|
|
|
@ -58,6 +58,7 @@ public:
|
|||
Quantity operator /(const Quantity &p) const;
|
||||
bool operator ==(const Quantity&) const;
|
||||
bool operator < (const Quantity&) const;
|
||||
bool operator > (const Quantity&) const;
|
||||
Quantity& operator =(const Quantity&);
|
||||
Quantity pow(const Quantity&)const;
|
||||
//@}
|
||||
|
|
Loading…
Reference in New Issue
Block a user