Explicitly store list of barrels for weapons

This commit is contained in:
2023-05-20 17:48:51 +01:00
parent 03611c6b95
commit 4cfb7d431a
9 changed files with 73 additions and 98 deletions
+6
View File
@@ -146,3 +146,9 @@ dbArg f x = f x x
-- TODO check whether this is simply the reader monad, flipped
dbArgChain :: (a -> b -> b) -> (a -> b -> b) -> a -> b -> b
dbArgChain f g x = f x . g x
spreadAroundCenter :: Int -> Float -> [Float]
spreadAroundCenter i x = [x * fromIntegral j - x*fromIntegral (i-1)*0.5 | j <- [0 .. i - 1]]
spreadFromCenter :: Int -> Float -> [Float]
spreadFromCenter i x = [x * fromIntegral j - x*fromIntegral (i-1)*0.5 | j <- [0 .. i - 1]]