add utility module
This commit is contained in:
parent
925359acc3
commit
be689da9bf
1 changed files with 13 additions and 0 deletions
13
src/Util.hs
Normal file
13
src/Util.hs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
module Util where
|
||||||
|
|
||||||
|
import qualified Data.Vector as V
|
||||||
|
|
||||||
|
-- internal imports
|
||||||
|
|
||||||
|
import Types
|
||||||
|
|
||||||
|
getFrame :: EngineData -> Int -> FrameData
|
||||||
|
getFrame engineData frame =
|
||||||
|
let frameVector = engineFrames engineData
|
||||||
|
in
|
||||||
|
frameVector V.! (frame `mod` V.length frameVector)
|
Loading…
Reference in a new issue