Change poke to use folding rather than store incremental ints in vector

This commit is contained in:
2022-06-27 15:33:24 +01:00
parent 0def31895f
commit 8b72df2772
9 changed files with 78 additions and 93 deletions
+3 -4
View File
@@ -141,12 +141,11 @@ radBounds :: (Float, Float,Float,Float) -> Float
radBounds (n,s,e,w) = max (n-s) (e-w) / 2
girderV'
:: Float -- ^ "cap" size
-> Float -- ^ height
:: Float -- ^ height
-> Float -- ^ distance between cross bars
-> Float -- ^ width
-> Point2 -> Point2 -> ForegroundShape
girderV' csize h d w x y = defaultForeground
girderV' h d w x y = defaultForeground
& fsPos .~ m
& fsRad .~ dist m x
& fsSPic .~ noPic sh
@@ -157,7 +156,7 @@ girderV' csize h d w x y = defaultForeground
sh = thinHighBar h (x' -.- n) (x' +.+ n)
<> thinHighBar h (y' -.- n) (y' +.+ n)
<> girderV h d w x' y'
n = csize *.* vNormal (normalizeV (x' -.- y'))
n = min (w + 10) 20 *.* vNormal (normalizeV (x' -.- y'))
girderV
:: Float -- ^ height