diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-04-17 21:14:05 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-04-17 21:14:05 +0200 |
commit | 001ef44aa84f17a0b40b9629a996ccc7ddfd1293 (patch) | |
tree | 7d4a0735613bf0588b09c6fc59364306548b7070 | |
parent | fe661aeb1a3be9e53aae1d8370740a380c7853fc (diff) | |
download | trivmix-001ef44aa84f17a0b40b9629a996ccc7ddfd1293.tar trivmix-001ef44aa84f17a0b40b9629a996ccc7ddfd1293.tar.gz trivmix-001ef44aa84f17a0b40b9629a996ccc7ddfd1293.tar.bz2 trivmix-001ef44aa84f17a0b40b9629a996ccc7ddfd1293.tar.xz trivmix-001ef44aa84f17a0b40b9629a996ccc7ddfd1293.zip |
Fixed wrong interpolation
-rw-r--r-- | trivmix/Trivmix.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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 | |||
123 | linInt x a b = a * (1 - x) + b * x | 123 | linInt x a b = a * (1 - x) + b * x |
124 | newLevel <- readMVar level | 124 | newLevel <- readMVar level |
125 | currentLevel <- readMVar level' | 125 | currentLevel <- readMVar level' |
126 | mapM_ (\x -> swapMVar level' (asFloat (linInt x) currentLevel newLevel) >> threadDelay delay) ([0..frames] :: [Float]) | 126 | mapM_ (\x -> swapMVar level' (asFloat (linInt x) currentLevel newLevel) >> threadDelay delay) ([0,recip frames..1] :: [Float]) |
127 | let withFiles = foldl (.) id $ map (\f -> onStateFile f (show initialLevel ++ "\n")) levelFiles | 127 | let withFiles = foldl (.) id $ map (\f -> onStateFile f (show initialLevel ++ "\n")) levelFiles |
128 | withFiles $ withINotify $ \inotify -> do | 128 | withFiles $ withINotify $ \inotify -> do |
129 | handleFiles inotify level levelFiles | 129 | handleFiles inotify level levelFiles |