Held item rclick use, tweak reload on lclick

This commit is contained in:
2023-05-28 10:17:32 +01:00
parent ec8317c14e
commit 10c9e2261f
9 changed files with 68 additions and 65 deletions
+13 -1
View File
@@ -19,6 +19,7 @@ import Dodge.Base.Arithmetic
import Dodge.Base.NewID
import Dodge.Base.Coordinate
import Dodge.Base.CardinalPoint
import Data.List (unfoldr)
--import Dodge.Zone
--import Dodge.Zone.Data
import Dodge.Base.Window
@@ -151,4 +152,15 @@ 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]]
spreadFromCenter i x = [x * fromIntegral j | j <- js]
where
js = take i outwardIntegers
outwardIntegers :: [Int]
outwardIntegers = unfoldr f (0, False)
where
f (x,True) = Just (x, (x,False))
f (x,False) = Just (-x, (x+1,True))
spreadCenter :: Int -> Float -> [Float]
spreadCenter i x = [x * fromIntegral j - x*fromIntegral (i-1)*0.5 | j <- [0 .. i - 1]]