MeleeGetLocWithinRect

Parameters
src location
r rect
comment
note

It returns a new location, does not remove or alter location passed as src. It means you must call RemoveLocation yourself after calling this function.

patch

1.00

Source
Blizzard.j
return type
location
Source code
function MeleeGetLocWithinRect takes location src, rect r returns location
    local real withinX = MeleeGetNearestValueWithin(GetLocationX(src), GetRectMinX(r), GetRectMaxX(r))
    local real withinY = MeleeGetNearestValueWithin(GetLocationY(src), GetRectMinY(r), GetRectMaxY(r))
    return Location(withinX, withinY)
endfunction