Heightmaps are fun

Today I fixed this bug, which was resulting in shallow ditches running precisely north-south through all grassland areas, every 500 meters or so.  In the screenshot to the left, I’m looking along one of these ditches (you can see it run straight up over the region boundary, behind my cursor).

Subtle math bugs are the best bugs.