]> git.sesse.net Git - nageru/commitdiff
Make fade progress actually go from 0 to 1, despite sigmoid at the end.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 9 Apr 2016 13:27:55 +0000 (15:27 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 9 Apr 2016 13:27:55 +0000 (15:27 +0200)
theme.lua

index bbc086a4e86f478dde7c2b66eabe8f64e78a0aee..495f1fc3cbff2d752c36e504ef00a7081d7b6354 100644 (file)
--- 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