summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-12 21:48:33 +0100
committerGitHub <noreply@github.com>2020-02-12 21:48:33 +0100
commit506df14595c7bf30dbaa2a62f5f675fdf1371c41 (patch)
tree71ab6ccdf2b3fd6719b1b28bd24c3a220a1e47bd /modules/gdscript
parentbac1073617c6bc70388e7b3df9d7dafeb8ec59cd (diff)
parentbd78b9f44525183e7f40b704ae644c2e1a4cbf87 (diff)
Merge pull request #36142 from akien-mga/remove-deprecated-decimals
Remove deprecated decimals builtin
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml9
-rw-r--r--modules/gdscript/gdscript_functions.cpp13
-rw-r--r--modules/gdscript/gdscript_functions.h1
3 files changed, 0 insertions, 23 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index b947d95fac..9fc8ad5573 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -256,15 +256,6 @@
Converts from decibels to linear energy (audio).
</description>
</method>
- <method name="decimals">
- <return type="int">
- </return>
- <argument index="0" name="step" type="float">
- </argument>
- <description>
- Deprecated alias for [method step_decimals].
- </description>
- </method>
<method name="dectime">
<return type="float">
</return>
diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp
index 27d67fda6d..1a5087eb4d 100644
--- a/modules/gdscript/gdscript_functions.cpp
+++ b/modules/gdscript/gdscript_functions.cpp
@@ -72,7 +72,6 @@ const char *GDScriptFunctions::get_func_name(Function p_func) {
"is_equal_approx",
"is_zero_approx",
"ease",
- "decimals",
"step_decimals",
"stepify",
"lerp",
@@ -346,12 +345,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
VALIDATE_ARG_NUM(1);
r_ret = Math::ease((double)*p_args[0], (double)*p_args[1]);
} break;
- case MATH_DECIMALS: {
- VALIDATE_ARG_COUNT(1);
- VALIDATE_ARG_NUM(0);
- r_ret = Math::step_decimals((double)*p_args[0]);
- WARN_DEPRECATED_MSG("GDScript method 'decimals' is deprecated and has been renamed to 'step_decimals', please update your code accordingly.");
- } break;
case MATH_STEP_DECIMALS: {
VALIDATE_ARG_COUNT(1);
VALIDATE_ARG_NUM(0);
@@ -1492,7 +1485,6 @@ bool GDScriptFunctions::is_deterministic(Function p_func) {
case MATH_ISNAN:
case MATH_ISINF:
case MATH_EASE:
- case MATH_DECIMALS:
case MATH_STEP_DECIMALS:
case MATH_STEPIFY:
case MATH_LERP:
@@ -1673,11 +1665,6 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
mi.return_val.type = Variant::REAL;
return mi;
} break;
- case MATH_DECIMALS: {
- MethodInfo mi("decimals", PropertyInfo(Variant::REAL, "step"));
- mi.return_val.type = Variant::INT;
- return mi;
- } break;
case MATH_STEP_DECIMALS: {
MethodInfo mi("step_decimals", PropertyInfo(Variant::REAL, "step"));
mi.return_val.type = Variant::INT;
diff --git a/modules/gdscript/gdscript_functions.h b/modules/gdscript/gdscript_functions.h
index 1812ddf121..8b97194ed6 100644
--- a/modules/gdscript/gdscript_functions.h
+++ b/modules/gdscript/gdscript_functions.h
@@ -63,7 +63,6 @@ public:
MATH_ISEQUALAPPROX,
MATH_ISZEROAPPROX,
MATH_EASE,
- MATH_DECIMALS,
MATH_STEP_DECIMALS,
MATH_STEPIFY,
MATH_LERP,