Implement collisions for bez bullets, creates infinite loop sometimes

This commit is contained in:
2021-03-15 14:11:35 +01:00
parent a5e0dc65da
commit 0519635a27
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ midPadL i x xs ys = take j (xs ++ repeat x) ++ ys
where j = i - length ys where j = i - length ys
takeUntil :: (a -> Bool) -> [a] -> [a] takeUntil :: (a -> Bool) -> [a] -> [a]
takeUntil f ps = case span f ps of takeUntil f ps = case span (not . f) ps of
(xs,[]) -> xs (xs,[]) -> xs
(xs,(y:_)) -> xs ++ [y] (xs,(y:_)) -> xs ++ [y]
+1
View File
@@ -9,6 +9,7 @@ module Picture
, arcSolid , arcSolid
, thickArc , thickArc
, thickCircle , thickCircle
, thickLine
, circleSolid , circleSolid
, circleSolidCol , circleSolidCol
, circle , circle