1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +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

@@ -506,9 +506,9 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
} else if (id == "null" || id == "nil") {
value = Variant();
} else if (id == "inf") {
value = Math_INF;
value = INFINITY;
} else if (id == "nan") {
value = Math_NAN;
value = NAN;
} else if (id == "Vector2") {
Vector<real_t> args;
Error err = _parse_construct<real_t>(p_stream, args, line, r_err_str);