summaryrefslogtreecommitdiff
path: root/core/math
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/math
parent6c818da55ef1f45eaed06e1413220af1d23a9c41 (diff)
Rename `range_lerp` to `remap`
Diffstat (limited to 'core/math')
-rw-r--r--core/math/math_funcs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h
index cae76b182a..656fc9f798 100644
--- a/core/math/math_funcs.h
+++ b/core/math/math_funcs.h
@@ -371,8 +371,8 @@ public:
static _ALWAYS_INLINE_ double inverse_lerp(double p_from, double p_to, double p_value) { return (p_value - p_from) / (p_to - p_from); }
static _ALWAYS_INLINE_ float inverse_lerp(float p_from, float p_to, float p_value) { return (p_value - p_from) / (p_to - p_from); }
- static _ALWAYS_INLINE_ double range_lerp(double p_value, double p_istart, double p_istop, double p_ostart, double p_ostop) { return Math::lerp(p_ostart, p_ostop, Math::inverse_lerp(p_istart, p_istop, p_value)); }
- static _ALWAYS_INLINE_ float range_lerp(float p_value, float p_istart, float p_istop, float p_ostart, float p_ostop) { return Math::lerp(p_ostart, p_ostop, Math::inverse_lerp(p_istart, p_istop, p_value)); }
+ static _ALWAYS_INLINE_ double remap(double p_value, double p_istart, double p_istop, double p_ostart, double p_ostop) { return Math::lerp(p_ostart, p_ostop, Math::inverse_lerp(p_istart, p_istop, p_value)); }
+ static _ALWAYS_INLINE_ float remap(float p_value, float p_istart, float p_istop, float p_ostart, float p_ostop) { return Math::lerp(p_ostart, p_ostop, Math::inverse_lerp(p_istart, p_istop, p_value)); }
static _ALWAYS_INLINE_ double smoothstep(double p_from, double p_to, double p_s) {
if (is_equal_approx(p_from, p_to)) {