From: Steinar H. Gunderson Date: Sat, 9 Apr 2016 13:27:55 +0000 (+0200) Subject: Make fade progress actually go from 0 to 1, despite sigmoid at the end. X-Git-Tag: 1.2.1~6 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d3fa584e1fb715b828c6b519277072a93cd95cc6;p=nageru Make fade progress actually go from 0 to 1, despite sigmoid at the end. --- diff --git a/theme.lua b/theme.lua index bbc086a..495f1fc 100644 --- a/theme.lua +++ b/theme.lua @@ -854,9 +854,9 @@ end function calc_fade_progress(t, transition_start, transition_end) local tt = (t - transition_start) / (transition_end - transition_start) if tt < 0.0 then - tt = 0.0 + return 0.0 elseif tt > 1.0 then - tt = 1.0 + return 1.0 end -- Make the fade look maybe a tad more natural, by pumping it