Attempt to improve perfomance
This commit is contained in:
@@ -23,12 +23,14 @@ wlIXsNearCirc :: Point2 -> Float -> World -> IS.IntSet
|
||||
wlIXsNearCirc p r = wlIXsNearRect (p +.+ V2 r r) (p -.- V2 r r)
|
||||
|
||||
wlsFromIXs :: World -> IS.IntSet -> [Wall]
|
||||
{-# INLINE wlsFromIXs #-}
|
||||
wlsFromIXs w = mapMaybe (\wlid -> w ^? cWorld . walls . ix wlid) . IS.toList
|
||||
|
||||
wlsNearPoint :: Point2 -> World -> [Wall]
|
||||
wlsNearPoint p w = wlsFromIXs w $ wlIXsNearPoint p w
|
||||
|
||||
wlsNearSeg :: Point2 -> Point2 -> World -> [Wall]
|
||||
{-# INLINE wlsNearSeg #-}
|
||||
wlsNearSeg sp ep w = wlsFromIXs w $ wlIXsNearSeg sp ep w
|
||||
|
||||
wlsNearRect :: Point2 -> Point2 -> World -> [Wall]
|
||||
|
||||
Reference in New Issue
Block a user