From 0da40f391ee00c82c3aef170a3b94ee29d431a3c Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Mon, 22 Oct 2012 19:38:51 +0200 Subject: [PATCH] make lerp more stable --- utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.h b/utils.h index 87bd726..8ea4a6e 100644 --- a/utils.h +++ b/utils.h @@ -29,7 +29,7 @@ float fclampf(float x, float min, float max) float flerpf(float a, float b, float x) { - return a - a * x + b * x; + return a * (1.0 - x) + b * x; } char *string_time(char *fmt)