Radius to Grid

Convert the radial coverage of a detector or sprinkler head into the maximum square grid spacing that keeps a fire at the centre within that radius.

A rectangular detector grid with the diagonal from the centre to a corner marked as the radius.
The grid returned is square, so the spacing is the same in both directions.
m