Skip to content

Commit

Permalink
use fmap for V2 division
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Nov 19, 2023
1 parent 95b5731 commit 3ae3661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Swarm/Game/World/Render.hs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ getDisplayGrid myScenario gs maybeSize =
upperLeftLocation =
if null maybeSize && not (isEmpty mapAreaDims)
then ul firstScenarioWorld
else view planar vc .+^ V2 (negate $ w `div` 2) (h `div` 2)
else view planar vc .+^ ((`div` 2) <$> V2 (negate w) h)

mkBoundingBox areaDimens upperLeftLoc =
both W.locToCoords locationBounds
Expand Down

0 comments on commit 3ae3661

Please sign in to comment.