@@ -55,8 +55,7 @@ updateController :: IORef (Double, Double) -> IO ()
55updateController ref = do
55updateController ref = do
56 e <- pollEvent
56 e <- pollEvent
58− MouseMotion x y _ _ -> do
59− writeIORef ref (fromIntegral x, fromIntegral y)
58+ MouseMotion x y _ _ -> writeIORef ref (fromIntegral x, fromIntegral y)
60 _ -> return ()
59 _ -> return ()
62------------------------------------------------------------------------------
61------------------------------------------------------------------------------
@@ -67,7 +66,7 @@ updateDisplay :: IORef (Double, Double) -> IO ()
67updateDisplay cref = do
66updateDisplay cref = do
68 time <- SDL.getTicks
67 time <- SDL.getTicks
69 (x, y) <- readIORef cref
68 (x, y) <- readIORef cref
70− let t = (fromIntegral time) * speed / 1000
69+ let t = fromIntegral time * speed / 1000
71 in display (x + cos t * radius, y + sin t * radius)
70 in display (x + cos t * radius, y + sin t * radius)