summaryrefslogtreecommitdiff
path: root/core/variant
diff options
context:
space:
mode:
authorMicky <micheledevita2@gmail.com>2022-09-05 14:05:50 +0200
committerMicky <micheledevita2@gmail.com>2022-09-06 07:19:20 +0200
commitb6daad8d4b4f828848e8ed778778e11ff92894dd (patch)
treef19ef0292c7c7071f859942bd9b9c7a02a17e468 /core/variant
parent6c818da55ef1f45eaed06e1413220af1d23a9c41 (diff)
Rename `range_lerp` to `remap`
Diffstat (limited to 'core/variant')
-rw-r--r--core/variant/variant_utility.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/variant/variant_utility.cpp b/core/variant/variant_utility.cpp
index 1be17405c7..7ff64c88f0 100644
--- a/core/variant/variant_utility.cpp
+++ b/core/variant/variant_utility.cpp
@@ -393,8 +393,8 @@ struct VariantUtilityFunctions {
return Math::inverse_lerp(from, to, weight);
}
- static inline double range_lerp(double value, double istart, double istop, double ostart, double ostop) {
- return Math::range_lerp(value, istart, istop, ostart, ostop);
+ static inline double remap(double value, double istart, double istop, double ostart, double ostop) {
+ return Math::remap(value, istart, istop, ostart, ostop);
}
static inline double smoothstep(double from, double to, double val) {
@@ -1434,7 +1434,7 @@ void Variant::_register_variant_utility_functions() {
FUNCBINDR(bezier_interpolate, sarray("start", "control_1", "control_2", "end", "t"), Variant::UTILITY_FUNC_TYPE_MATH);
FUNCBINDR(lerp_angle, sarray("from", "to", "weight"), Variant::UTILITY_FUNC_TYPE_MATH);
FUNCBINDR(inverse_lerp, sarray("from", "to", "weight"), Variant::UTILITY_FUNC_TYPE_MATH);
- FUNCBINDR(range_lerp, sarray("value", "istart", "istop", "ostart", "ostop"), Variant::UTILITY_FUNC_TYPE_MATH);
+ FUNCBINDR(remap, sarray("value", "istart", "istop", "ostart", "ostop"), Variant::UTILITY_FUNC_TYPE_MATH);
FUNCBINDR(smoothstep, sarray("from", "to", "x"), Variant::UTILITY_FUNC_TYPE_MATH);
FUNCBINDR(move_toward, sarray("from", "to", "delta"), Variant::UTILITY_FUNC_TYPE_MATH);