Linting
This commit is contained in:
+8
-5
@@ -26,13 +26,16 @@ worldGraph w p = HS.unions $ fmap (\q -> HS.fromList $ pointsAlong w p (p +.+ q)
|
||||
|
||||
pointsAlong :: World -> Point2 -> Point2 -> [Point2]
|
||||
pointsAlong w p q = divideLineFixed 50 p p'
|
||||
where p' = furthestPointWalkable p q $ wallsAlongLine p q w
|
||||
where
|
||||
p' = furthestPointWalkable p q $ wallsAlongLine p q w
|
||||
|
||||
divideLineFixed :: Float -> Point2 -> Point2 -> [Point2]
|
||||
divideLineFixed x a b = fmap (\i -> a +.+ i * x *.* normalizeV (b -.- a))
|
||||
$ fmap fromIntegral ns
|
||||
where numPoints = floor $ dist a b / x
|
||||
ns = [1 .. numPoints]
|
||||
divideLineFixed x a b = fmap
|
||||
( \i -> a +.+ i * x *.* normalizeV (b -.- a) )
|
||||
ns
|
||||
where
|
||||
numPoints = floor $ dist a b / x
|
||||
ns = map fromIntegral [1 .. numPoints]
|
||||
|
||||
-- ok, astar or something like it
|
||||
|
||||
|
||||
Reference in New Issue
Block a user