1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

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.
This commit is contained in:
Hugo Locurcio
2021-07-21 10:40:31 +02:00
parent 8cc599db64
commit 4bd5e4fd9b
14 changed files with 23 additions and 25 deletions

View File

@@ -2123,10 +2123,10 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_builtin_constant(Expressio
constant->value = Math_TAU;
break;
case GDScriptTokenizer::Token::CONST_INF:
constant->value = Math_INF;
constant->value = INFINITY;
break;
case GDScriptTokenizer::Token::CONST_NAN:
constant->value = Math_NAN;
constant->value = NAN;
break;
default:
return nullptr; // Unreachable.