You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Inf and NaN support added to GDScript.
This commit is contained in:
@@ -375,6 +375,22 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_
|
||||
constant->value=Math_PI;
|
||||
tokenizer->advance();
|
||||
expr=constant;
|
||||
}
|
||||
else if (tokenizer->get_token() == GDTokenizer::TK_CONST_INF) {
|
||||
|
||||
//constant defined by tokenizer
|
||||
ConstantNode *constant = alloc_node<ConstantNode>();
|
||||
constant->value = Math_INF;
|
||||
tokenizer->advance();
|
||||
expr = constant;
|
||||
}
|
||||
else if (tokenizer->get_token() == GDTokenizer::TK_CONST_NAN) {
|
||||
|
||||
//constant defined by tokenizer
|
||||
ConstantNode *constant = alloc_node<ConstantNode>();
|
||||
constant->value = Math_NAN;
|
||||
tokenizer->advance();
|
||||
expr = constant;
|
||||
} else if (tokenizer->get_token()==GDTokenizer::TK_PR_PRELOAD) {
|
||||
|
||||
//constant defined by tokenizer
|
||||
|
||||
Reference in New Issue
Block a user