MeleeGetNearestValueWithin
- Parameters
-
val real
minVal real
maxVal real
- comment
-
It's the typical math.clamp. Returns
val
if it's within the bounds, else min/maxVal.minVal
must be less than or equal <=maxVal
- patch
-
1.00
- Source
- Blizzard.j (suggest an edit or discuss on Github)
- return type
-
real
- Source code
-
function MeleeGetNearestValueWithin takes real val, real minVal, real maxVal returns real if (val < minVal) then return minVal elseif (val > maxVal) then return maxVal else return val endif endfunction