Restrict some arguments
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
module Dodge.Zoning.World where
|
||||
module Dodge.Zoning.World
|
||||
( zoneOfSight
|
||||
) where
|
||||
|
||||
import Dodge.Data.World
|
||||
import Dodge.Data.CamPos
|
||||
import Geometry.Data
|
||||
import Control.Lens
|
||||
|
||||
zoneOfSight :: Float -> World -> [Int2]
|
||||
zoneOfSight :: Float -> CamPos -> [Int2]
|
||||
zoneOfSight s w =
|
||||
[ V2 a b
|
||||
| a <- [minimum xs .. maximum xs]
|
||||
, b <- [minimum ys .. maximum ys]
|
||||
]
|
||||
where
|
||||
(xs, ys) = unzip $ map sizeZoneOfPoint $ w ^. cWorld . lWorld . camPos . camBoundBox
|
||||
(xs, ys) = unzip $ map sizeZoneOfPoint $ w ^. camBoundBox
|
||||
sizeZoneOfPoint (V2 x y) = (f x, f y)
|
||||
where
|
||||
f = floor . (/ s)
|
||||
f = floor . (/ s)
|
||||
|
||||
Reference in New Issue
Block a user