diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-02-28 23:00:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-28 23:00:30 +0100 |
commit | c5df3d4d8d3d6ee74b0dad5eeb45f318c8b205a9 (patch) | |
tree | a8e79b3f4a557ce4097791f5622728c69d22764f /modules/gdscript/gd_editor.cpp | |
parent | 0f8c6dd3822c38b8145f08265abb9eba479f4d15 (diff) | |
parent | 5e938f000136c076f9f35b8332dc7c022687a983 (diff) |
Merge pull request #7787 from SaracenOne/nan_and_inf
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 { |