From 8bcbd2729388edc63c82d77d314b583af1447c49 Mon Sep 17 00:00:00 2001 From: untodesu Date: Sun, 14 Sep 2025 19:16:44 +0500 Subject: Cleanup math with qfengine ports again --- game/client/gui/progress_bar.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'game/client/gui/progress_bar.cc') diff --git a/game/client/gui/progress_bar.cc b/game/client/gui/progress_bar.cc index 9266ce1..46277b5 100644 --- a/game/client/gui/progress_bar.cc +++ b/game/client/gui/progress_bar.cc @@ -58,10 +58,10 @@ void gui::progress_bar::layout(void) const float modifier = std::exp(-8.0f * (0.5f + 0.5f * sinval)); ImVec4 color = {}; - color.x = math::lerp(background.x, foreground.x, modifier); - color.y = math::lerp(background.y, foreground.y, modifier); - color.z = math::lerp(background.z, foreground.z, modifier); - color.w = math::lerp(background.w, foreground.w, modifier); + color.x = glm::mix(background.x, foreground.x, modifier); + color.y = glm::mix(background.y, foreground.y, modifier); + color.z = glm::mix(background.z, foreground.z, modifier); + color.w = glm::mix(background.w, foreground.w, modifier); const ImVec2 start = ImVec2(base_xpos + bar_width * i, base_ypos); const ImVec2 end = ImVec2(start.x + bar_width, start.y + bar_height); -- cgit