Merge pull request #50686 from Calinou/use-standard-inf-nan-constants

Use the standard C `INFINITY` and `NAN` constants directly
This commit is contained in:
Rémi Verschelde 2021-07-21 11:50:26 +02:00 committed by GitHub
commit 2273f13fbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 23 additions and 25 deletions

View file

@ -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") {

View file

@ -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 {