summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gd_editor.cpp
diff options
context:
space:
mode:
authorSaracen <SaracenOne@gmail.com>2017-02-06 22:44:22 +0000
committerSaracen <SaracenOne@gmail.com>2017-02-28 21:52:33 +0000
commit5e938f000136c076f9f35b8332dc7c022687a983 (patch)
treea8e79b3f4a557ce4097791f5622728c69d22764f /modules/gdscript/gd_editor.cpp
parent0f8c6dd3822c38b8145f08265abb9eba479f4d15 (diff)
downloadredot-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.cpp10
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 {