git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7642 c06c8d41-db1a-0410-9941-cceddc491573
Y4WCLUMXXAYCZK4QMOEFK6JACNGO7RDASZ2GZWBYLJFQVWGFJE4QC
local asqrt = math.sqrt(area)
local b = crawl.random_range(1 + asqrt / 2, asqrt + 1)
local function rectangle_eccentricity()
-- exc is the excentrity for the two rectangle, it grows with depth as
-- 0, 0-1, 1, 1-2, 2, ...
local exc = math.floor((zig().depth-1) / 2)
if ((zig().depth-1) % 2) ~= 0 and crawl.coinflip() then
exc = exc + 1
end
return exc
end
local exc = rectangle_eccentricity()
local b = math.floor(math.sqrt(area+12*exc*exc)) - 4*exc