Implement collisions for bez bullets, creates infinite loop sometimes
This commit is contained in:
+1
-1
@@ -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]
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ module Picture
|
|||||||
, arcSolid
|
, arcSolid
|
||||||
, thickArc
|
, thickArc
|
||||||
, thickCircle
|
, thickCircle
|
||||||
|
, thickLine
|
||||||
, circleSolid
|
, circleSolid
|
||||||
, circleSolidCol
|
, circleSolidCol
|
||||||
, circle
|
, circle
|
||||||
|
|||||||
Reference in New Issue
Block a user