Minor tweaking, argument refining
This commit is contained in:
+3
-3
@@ -4,12 +4,12 @@ module Dodge.Clock (
|
||||
|
||||
import Control.Lens
|
||||
import qualified Data.Vector as V
|
||||
import Dodge.Data.World
|
||||
import Dodge.Data.LWorld
|
||||
|
||||
clockCycle :: Int -> V.Vector a -> World -> a
|
||||
clockCycle :: Int -> V.Vector a -> LWorld -> a
|
||||
{-# INLINEABLE clockCycle #-}
|
||||
clockCycle tPeriod xs w = xs V.! i
|
||||
where
|
||||
l = V.length xs
|
||||
t = (w ^. cWorld . lWorld . lClock) `mod` (l * tPeriod)
|
||||
t = (w ^. lClock) `mod` (l * tPeriod)
|
||||
i = t `div` tPeriod
|
||||
|
||||
Reference in New Issue
Block a user