Try to simplify link code in roomRect

This commit is contained in:
2025-10-27 15:10:19 +00:00
parent c88fc1c729
commit 0946ee1310
9 changed files with 95 additions and 105 deletions
+2 -1
View File
@@ -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