From 343d0e973e4eea1ca4f58bc6a518088fc8471eff Mon Sep 17 00:00:00 2001 From: lmp Date: Mon, 1 Jan 2024 13:38:23 +0100 Subject: [PATCH] animation: fix another "error: cannot assign to `a.value`: expected `f32`, not `f64`" --- lib/animation.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/animation.v b/lib/animation.v index 1ee60b6..387f362 100644 --- a/lib/animation.v +++ b/lib/animation.v @@ -449,7 +449,7 @@ fn (fa &FollowAnimator[T]) step(dt f64) { value := a.value + ((a.target - a.value) * 0.1 * (dt * (dt * 1000)) * a.multiply) // value := utils.remap(a.t, 0, 1.0, a.from, a.to) lerp_value := utils.lerp(value, a.prev_value, dt) - a.value = lerp_value + a.value = T(lerp_value) // round_to_even() ?? (Banker's round) p_running := a.running