Remove obsolete "dectime" method
Replaced by "move_toward"
This commit is contained in:
parent
63be3c1f00
commit
2733b9abd8
8 changed files with 37 additions and 103 deletions
|
|
@ -88,16 +88,6 @@ int Math::range_step_decimals(double p_step) {
|
|||
return step_decimals(p_step);
|
||||
}
|
||||
|
||||
double Math::dectime(double p_value, double p_amount, double p_step) {
|
||||
double sgn = p_value < 0 ? -1.0 : 1.0;
|
||||
double val = Math::abs(p_value);
|
||||
val -= p_amount * p_step;
|
||||
if (val < 0.0) {
|
||||
val = 0.0;
|
||||
}
|
||||
return val * sgn;
|
||||
}
|
||||
|
||||
double Math::ease(double p_x, double p_c) {
|
||||
if (p_x < 0) {
|
||||
p_x = 0;
|
||||
|
|
|
|||
|
|
@ -296,7 +296,6 @@ public:
|
|||
static int step_decimals(double p_step);
|
||||
static int range_step_decimals(double p_step);
|
||||
static double snapped(double p_value, double p_step);
|
||||
static double dectime(double p_value, double p_amount, double p_step);
|
||||
|
||||
static uint32_t larger_prime(uint32_t p_val);
|
||||
|
||||
|
|
|
|||
|
|
@ -249,10 +249,6 @@ struct VariantUtilityFunctions {
|
|||
return Math::move_toward(from, to, delta);
|
||||
}
|
||||
|
||||
static inline double dectime(double value, double amount, double step) {
|
||||
return Math::dectime(value, amount, step);
|
||||
}
|
||||
|
||||
static inline double deg2rad(double angle_deg) {
|
||||
return Math::deg2rad(angle_deg);
|
||||
}
|
||||
|
|
@ -1195,7 +1191,6 @@ void Variant::_register_variant_utility_functions() {
|
|||
|
||||
FUNCBINDR(smoothstep, sarray("from", "to", "x"), Variant::UTILITY_FUNC_TYPE_MATH);
|
||||
FUNCBINDR(move_toward, sarray("from", "to", "delta"), Variant::UTILITY_FUNC_TYPE_MATH);
|
||||
FUNCBINDR(dectime, sarray("value", "amount", "step"), Variant::UTILITY_FUNC_TYPE_MATH);
|
||||
|
||||
FUNCBINDR(deg2rad, sarray("deg"), Variant::UTILITY_FUNC_TYPE_MATH);
|
||||
FUNCBINDR(rad2deg, sarray("rad"), Variant::UTILITY_FUNC_TYPE_MATH);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue