Try to simplify link code in roomRect
This commit is contained in:
+2
-1
@@ -28,7 +28,8 @@ latticeXsYs xs ys =
|
||||
foldMap (\y -> mkpairs xs & each . each %~ (`V2` y)) ys
|
||||
<> foldMap (\x -> mkpairs ys & each . each %~ V2 x) xs
|
||||
where
|
||||
mkpairs zs = zip zs $ tail zs
|
||||
mkpairs (z:zs) = zip (z:zs) $ zs
|
||||
mkpairs [] = []
|
||||
|
||||
gridPointsOff :: Float -> Float -> Float -> Int -> Float -> Int -> [Point2]
|
||||
gridPointsOff xoff yoff x nx y ny = map f $ gridPoints' nx ny
|
||||
|
||||
Reference in New Issue
Block a user