From 7345b1a1ea2671953df48c8a18524a7e556d383c Mon Sep 17 00:00:00 2001 From: Dickby Date: Sat, 11 Nov 2023 14:15:37 +0100 Subject: [PATCH] shaders: Use clamp in doubleCircleSigmoid. (#3824) --- src/render/shaders/Textures.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/render/shaders/Textures.hpp b/src/render/shaders/Textures.hpp index e0a2b498..daa7bc9b 100644 --- a/src/render/shaders/Textures.hpp +++ b/src/render/shaders/Textures.hpp @@ -205,9 +205,7 @@ const float c = 0.66; // Determines the smoothness of the transition of unboost // http://www.flong.com/archive/texts/code/shapers_circ/ float doubleCircleSigmoid(float x, float a) { - float min_param_a = 0.0; - float max_param_a = 1.0; - a = max(min_param_a, min(max_param_a, a)); + a = clamp(a, 0.0, 1.0); float y = .0; if (x <= a) {