diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-07-21 10:40:31 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-07-21 10:41:08 +0200 |
commit | 4bd5e4fd9b80384d511e4c8f2f642b43159aba4c (patch) | |
tree | 092ae6bcfd67e321558102c03f162200ba9e909e /core/math/expression.cpp | |
parent | 8cc599db645a356ca6af3bc15e7574fa6e3ada0e (diff) |
Use the standard C `INFINITY` and `NAN` constants directly
The `Math_INF` and `Math_NAN` defines were just aliases for those
constants, so we might as well use them directly.
Some portions of the code were already using `INFINITY` directly.
Diffstat (limited to 'core/math/expression.cpp')
-rw-r--r-- | core/math/expression.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/expression.cpp b/core/math/expression.cpp index 0146c345f0..05f2c8dac9 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -397,10 +397,10 @@ Error Expression::_get_token(Token &r_token) { r_token.value = Math_TAU; } else if (id == "INF") { r_token.type = TK_CONSTANT; - r_token.value = Math_INF; + r_token.value = INFINITY; } else if (id == "NAN") { r_token.type = TK_CONSTANT; - r_token.value = Math_NAN; + r_token.value = NAN; } else if (id == "not") { r_token.type = TK_OP_NOT; } else if (id == "or") { |