From 001ef44aa84f17a0b40b9629a996ccc7ddfd1293 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 17 Apr 2016 21:14:05 +0200 Subject: Fixed wrong interpolation --- trivmix/Trivmix.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trivmix/Trivmix.hs b/trivmix/Trivmix.hs index 2cd1252..f7c1b48 100644 --- a/trivmix/Trivmix.hs +++ b/trivmix/Trivmix.hs @@ -123,7 +123,7 @@ trivmix Options{..} = do linInt x a b = a * (1 - x) + b * x newLevel <- readMVar level currentLevel <- readMVar level' - mapM_ (\x -> swapMVar level' (asFloat (linInt x) currentLevel newLevel) >> threadDelay delay) ([0..frames] :: [Float]) + mapM_ (\x -> swapMVar level' (asFloat (linInt x) currentLevel newLevel) >> threadDelay delay) ([0,recip frames..1] :: [Float]) let withFiles = foldl (.) id $ map (\f -> onStateFile f (show initialLevel ++ "\n")) levelFiles withFiles $ withINotify $ \inotify -> do handleFiles inotify level levelFiles -- cgit v1.2.3