mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add isNegative to RationalNumberType
This commit is contained in:
parent
5225a5bb5e
commit
c01f5699e6
@ -411,6 +411,9 @@ public:
|
||||
/// @returns true if the value is not an integer.
|
||||
bool isFractional() const { return m_value.denominator() != 1; }
|
||||
|
||||
/// @returns true if the value is negative.
|
||||
bool isNegative() const { return m_value < 0; }
|
||||
|
||||
private:
|
||||
rational m_value;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user