Get out external function for grid room positions
This commit is contained in:
-10
@@ -1,7 +1,5 @@
|
||||
module Grid (
|
||||
gridInPolygon,
|
||||
gridPoints,
|
||||
gridPoints'',
|
||||
latticeXsYs,
|
||||
) where
|
||||
|
||||
@@ -36,13 +34,5 @@ gridPointsOff xoff yoff x nx y ny = map f $ gridPoints' nx ny
|
||||
where
|
||||
f (a, b) = V2 (xoff + fromIntegral a * x) (yoff + fromIntegral b * y)
|
||||
|
||||
gridPoints :: Float -> Int -> Float -> Int -> [Point2]
|
||||
gridPoints = gridPointsOff 0 0
|
||||
|
||||
gridPoints'' :: Float -> Int -> Float -> Int -> [(Point2, (Int, Int))]
|
||||
gridPoints'' x nx y ny = map f $ gridPoints' nx ny
|
||||
where
|
||||
f (a, b) = (V2 (fromIntegral a * x) (fromIntegral b * y), (a, b))
|
||||
|
||||
gridPoints' :: Int -> Int -> [(Int, Int)]
|
||||
gridPoints' nx ny = [(x, y) | x <- [0 .. nx -1], y <- [0 .. ny -1]]
|
||||
|
||||
Reference in New Issue
Block a user