Make bezier gun target on scroll

This commit is contained in:
jgk
2021-03-16 11:33:47 +01:00
parent 24aede4cac
commit 97fd7f5576
6 changed files with 23 additions and 27 deletions
+1
View File
@@ -298,6 +298,7 @@ divideLine x a b = take 5000 $ map (\i -> a +.+ (i / (fromIntegral numPoints) *.
-- pulled the following from the haskell wiki
-- it seems to produce an infinite loop sometimes
-- fuck that, don't trust random code on the internet
bresenham :: (Int,Int) -> (Int,Int) -> [(Int,Int)]
{-# INLINE bresenham #-}
bresenham pa@(xa,ya) pb@(xb,yb) = map maySwitch . unfoldr go $ (x1,y1,0)