diff options
author | Saracen <SaracenOne@gmail.com> | 2017-02-06 22:44:22 +0000 |
---|---|---|
committer | Saracen <SaracenOne@gmail.com> | 2017-02-28 21:52:33 +0000 |
commit | 5e938f000136c076f9f35b8332dc7c022687a983 (patch) | |
tree | a8e79b3f4a557ce4097791f5622728c69d22764f /modules/gdscript/gd_editor.cpp | |
parent | 0f8c6dd3822c38b8145f08265abb9eba479f4d15 (diff) | |
download | redot-engine-5e938f000136c076f9f35b8332dc7c022687a983.tar.gz |
Inf and NaN support added to GDScript.
Diffstat (limited to 'modules/gdscript/gd_editor.cpp')
-rw-r--r-- | modules/gdscript/gd_editor.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index 352016b2d2..9dd41847d7 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -323,6 +323,16 @@ void GDScriptLanguage::get_public_constants(List<Pair<String,Variant> > *p_const pi.first="PI"; pi.second=Math_PI; p_constants->push_back(pi); + + Pair<String, Variant> infinity; + infinity.first = "INF"; + infinity.second = Math_INF; + p_constants->push_back(infinity); + + Pair<String, Variant> nan; + nan.first = "NAN"; + nan.second = Math_NAN; + p_constants->push_back(nan); } String GDScriptLanguage::make_function(const String& p_class,const String& p_name,const PoolStringArray& p_args) const { |