MeleeGetLocWithinRect
- Parameters
src locationr rect- comment
- note
It returns a new location, does not remove or alter location passed as
src. It means you must callRemoveLocationyourself after calling this function.- patch
1.00
- Source
- Blizzard.j (suggest an edit or discuss on Github)
- 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