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 /modules/visual_script | |
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 'modules/visual_script')
-rw-r--r-- | modules/visual_script/visual_script_expression.cpp | 4 | ||||
-rw-r--r-- | modules/visual_script/visual_script_nodes.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp index d63fbeb726..99b7275008 100644 --- a/modules/visual_script/visual_script_expression.cpp +++ b/modules/visual_script/visual_script_expression.cpp @@ -526,10 +526,10 @@ Error VisualScriptExpression::_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") { diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index 2a46051ccf..5e3451ee2b 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -2182,8 +2182,8 @@ double VisualScriptMathConstant::const_value[MATH_CONSTANT_MAX] = { Math_TAU, 2.71828182845904523536, Math::sqrt(2.0), - Math_INF, - Math_NAN + INFINITY, + NAN }; int VisualScriptMathConstant::get_output_sequence_port_count() const { |