some fixes and comparison interface for Unit and Quantity python objects
This commit is contained in:
@@ -71,6 +71,14 @@ bool Quantity::operator ==(const Quantity& that) const
|
||||
return (this->_Value == that._Value) && (this->_Unit == that._Unit) ;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user