GetRectFromCircleBJ

Parameters
centerlocation
radiusreal
comment

Returns a new, centered rectangle with the dimensions to encompass the circle.

note

It does not touch the passed center location, you must remove it manually to avoid leaks.

patch

1.00

Source
Blizzard.j (raise an issue to discuss on Github or submit a PR)
return type
rect
Source code
function GetRectFromCircleBJ takes location center, real radius returns rect
    local real centerX = GetLocationX(center)
    local real centerY = GetLocationY(center)
    return Rect(centerX - radius, centerY - radius, centerX + radius, centerY + radius)
endfunction