From e9bbf02b2b450269c08ba348d352159f4658024b Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 15 Sep 2024 13:03:12 +0200 Subject: [PATCH] Update rtextures.c --- src/rtextures.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rtextures.c b/src/rtextures.c index 0a5ab793e..8bda75ad8 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -5190,8 +5190,8 @@ Color ColorLerp(Color color1, Color color2, float factor) { Color color = { 0 }; - if (d < 0) d = 0.0f; - else if (d > 1) d = 1.0f; + if (factor < 0.0f) factor = 0.0f; + else if (factor > 1.0f) factor = 1.0f; color.r = (unsigned char)((1.0f - factor)*color1.r + factor*color2.r); color.g = (unsigned char)((1.0f - factor)*color1.g + factor*color2.g);