diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-02 08:16:50 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-02-02 08:16:50 +0800 |
commit | c01f5699e673f600fe87056b414996fef2224242 (patch) | |
tree | e9debb3428ff5863d5098c5f7134f12ce161e070 /libsolidity | |
parent | 5225a5bb5e9a23657f496e6638146746594e9bf9 (diff) | |
download | dexon-solidity-c01f5699e673f600fe87056b414996fef2224242.tar.gz dexon-solidity-c01f5699e673f600fe87056b414996fef2224242.tar.zst dexon-solidity-c01f5699e673f600fe87056b414996fef2224242.zip |
Add isNegative to RationalNumberType
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/ast/Types.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h index 3917dca2..e280b32c 100644 --- a/libsolidity/ast/Types.h +++ b/libsolidity/ast/Types.h @@ -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; }; |