Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
bd78b9f4
Commit
bd78b9f4
authored
Feb 12, 2020
by
Rémi Verschelde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated decimals builtin
Replaced by 'step_decimals' in 3.2 via #21425.
parent
49eef118
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
40 deletions
+9
-40
expression.cpp
core/math/expression.cpp
+0
-7
expression.h
core/math/expression.h
+0
-1
@GDScript.xml
modules/gdscript/doc_classes/@GDScript.xml
+0
-9
gdscript_functions.cpp
modules/gdscript/gdscript_functions.cpp
+0
-13
gdscript_functions.h
modules/gdscript/gdscript_functions.h
+0
-1
VisualScriptBuiltinFunc.xml
...les/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
+1
-1
visual_script_builtin_funcs.cpp
modules/visual_script/visual_script_builtin_funcs.cpp
+7
-7
visual_script_builtin_funcs.h
modules/visual_script/visual_script_builtin_funcs.h
+1
-1
No files found.
core/math/expression.cpp
View file @
bd78b9f4
...
...
@@ -64,7 +64,6 @@ const char *Expression::func_name[Expression::FUNC_MAX] = {
"is_nan"
,
"is_inf"
,
"ease"
,
"decimals"
,
"step_decimals"
,
"stepify"
,
"lerp"
,
...
...
@@ -153,7 +152,6 @@ int Expression::get_func_argument_count(BuiltinFunc p_func) {
case
MATH_EXP
:
case
MATH_ISNAN
:
case
MATH_ISINF
:
case
MATH_DECIMALS
:
case
MATH_STEP_DECIMALS
:
case
MATH_SEED
:
case
MATH_RANDSEED
:
...
...
@@ -376,11 +374,6 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
VALIDATE_ARG_NUM
(
1
);
*
r_return
=
Math
::
ease
((
double
)
*
p_inputs
[
0
],
(
double
)
*
p_inputs
[
1
]);
}
break
;
case
MATH_DECIMALS
:
{
VALIDATE_ARG_NUM
(
0
);
*
r_return
=
Math
::
step_decimals
((
double
)
*
p_inputs
[
0
]);
}
break
;
case
MATH_STEP_DECIMALS
:
{
VALIDATE_ARG_NUM
(
0
);
...
...
core/math/expression.h
View file @
bd78b9f4
...
...
@@ -63,7 +63,6 @@ public:
MATH_ISNAN
,
MATH_ISINF
,
MATH_EASE
,
MATH_DECIMALS
,
MATH_STEP_DECIMALS
,
MATH_STEPIFY
,
MATH_LERP
,
...
...
modules/gdscript/doc_classes/@GDScript.xml
View file @
bd78b9f4
...
...
@@ -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>
...
...
modules/gdscript/gdscript_functions.cpp
View file @
bd78b9f4
...
...
@@ -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
;
...
...
modules/gdscript/gdscript_functions.h
View file @
bd78b9f4
...
...
@@ -63,7 +63,6 @@ public:
MATH_ISEQUALAPPROX
,
MATH_ISZEROAPPROX
,
MATH_EASE
,
MATH_DECIMALS
,
MATH_STEP_DECIMALS
,
MATH_STEPIFY
,
MATH_LERP
,
...
...
modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
View file @
bd78b9f4
...
...
@@ -89,7 +89,7 @@
<constant
name=
"MATH_EASE"
value=
"23"
enum=
"BuiltinFunc"
>
Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
</constant>
<constant
name=
"MATH_DECIMALS"
value=
"24"
enum=
"BuiltinFunc"
>
<constant
name=
"MATH_
STEP_
DECIMALS"
value=
"24"
enum=
"BuiltinFunc"
>
Return the number of digit places after the decimal that the first non-zero digit occurs.
</constant>
<constant
name=
"MATH_STEPIFY"
value=
"25"
enum=
"BuiltinFunc"
>
...
...
modules/visual_script/visual_script_builtin_funcs.cpp
View file @
bd78b9f4
...
...
@@ -63,7 +63,7 @@ const char *VisualScriptBuiltinFunc::func_name[VisualScriptBuiltinFunc::FUNC_MAX
"is_nan"
,
"is_inf"
,
"ease"
,
"decimals"
,
"
step_
decimals"
,
"stepify"
,
"lerp"
,
"inverse_lerp"
,
...
...
@@ -171,7 +171,7 @@ int VisualScriptBuiltinFunc::get_func_argument_count(BuiltinFunc p_func) {
case
MATH_EXP
:
case
MATH_ISNAN
:
case
MATH_ISINF
:
case
MATH_DECIMALS
:
case
MATH_
STEP_
DECIMALS
:
case
MATH_SEED
:
case
MATH_RANDSEED
:
case
MATH_DEG2RAD
:
...
...
@@ -312,7 +312,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
else
return
PropertyInfo
(
Variant
::
REAL
,
"curve"
);
}
break
;
case
MATH_DECIMALS
:
{
case
MATH_
STEP_
DECIMALS
:
{
return
PropertyInfo
(
Variant
::
REAL
,
"step"
);
}
break
;
case
MATH_STEPIFY
:
{
...
...
@@ -528,7 +528,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
case
MATH_EASE
:
{
t
=
Variant
::
REAL
;
}
break
;
case
MATH_DECIMALS
:
{
case
MATH_
STEP_
DECIMALS
:
{
t
=
Variant
::
INT
;
}
break
;
case
MATH_STEPIFY
:
...
...
@@ -841,7 +841,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
VALIDATE_ARG_NUM
(
1
);
*
r_return
=
Math
::
ease
((
double
)
*
p_inputs
[
0
],
(
double
)
*
p_inputs
[
1
]);
}
break
;
case
VisualScriptBuiltinFunc
:
:
MATH_DECIMALS
:
{
case
VisualScriptBuiltinFunc
:
:
MATH_
STEP_
DECIMALS
:
{
VALIDATE_ARG_NUM
(
0
);
*
r_return
=
Math
::
step_decimals
((
double
)
*
p_inputs
[
0
]);
...
...
@@ -1361,7 +1361,7 @@ void VisualScriptBuiltinFunc::_bind_methods() {
BIND_ENUM_CONSTANT
(
MATH_ISNAN
);
BIND_ENUM_CONSTANT
(
MATH_ISINF
);
BIND_ENUM_CONSTANT
(
MATH_EASE
);
BIND_ENUM_CONSTANT
(
MATH_DECIMALS
);
BIND_ENUM_CONSTANT
(
MATH_
STEP_
DECIMALS
);
BIND_ENUM_CONSTANT
(
MATH_STEPIFY
);
BIND_ENUM_CONSTANT
(
MATH_LERP
);
BIND_ENUM_CONSTANT
(
MATH_INVERSE_LERP
);
...
...
@@ -1455,7 +1455,7 @@ void register_visual_script_builtin_func_node() {
VisualScriptLanguage
::
singleton
->
add_register_func
(
"functions/built_in/isinf"
,
create_builtin_func_node
<
VisualScriptBuiltinFunc
::
MATH_ISINF
>
);
VisualScriptLanguage
::
singleton
->
add_register_func
(
"functions/built_in/ease"
,
create_builtin_func_node
<
VisualScriptBuiltinFunc
::
MATH_EASE
>
);
VisualScriptLanguage
::
singleton
->
add_register_func
(
"functions/built_in/
decimals"
,
create_builtin_func_node
<
VisualScriptBuiltinFunc
::
MATH
_DECIMALS
>
);
VisualScriptLanguage
::
singleton
->
add_register_func
(
"functions/built_in/
step_decimals"
,
create_builtin_func_node
<
VisualScriptBuiltinFunc
::
MATH_STEP
_DECIMALS
>
);
VisualScriptLanguage
::
singleton
->
add_register_func
(
"functions/built_in/stepify"
,
create_builtin_func_node
<
VisualScriptBuiltinFunc
::
MATH_STEPIFY
>
);
VisualScriptLanguage
::
singleton
->
add_register_func
(
"functions/built_in/lerp"
,
create_builtin_func_node
<
VisualScriptBuiltinFunc
::
MATH_LERP
>
);
VisualScriptLanguage
::
singleton
->
add_register_func
(
"functions/built_in/lerp_angle"
,
create_builtin_func_node
<
VisualScriptBuiltinFunc
::
MATH_LERP_ANGLE
>
);
...
...
modules/visual_script/visual_script_builtin_funcs.h
View file @
bd78b9f4
...
...
@@ -63,7 +63,7 @@ public:
MATH_ISNAN
,
MATH_ISINF
,
MATH_EASE
,
MATH_DECIMALS
,
MATH_
STEP_
DECIMALS
,
MATH_STEPIFY
,
MATH_LERP
,
MATH_INVERSE_LERP
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment