|
|
|
|
@ -90,6 +90,7 @@ Bastion:RegisterLibrary(Bastion.Library:New({ |
|
|
|
|
---@return number |
|
|
|
|
function Math.RandomNumberGenerator(lowRange, highRange, divisor) |
|
|
|
|
local lowNum, highNum |
|
|
|
|
divisor = divisor or 1 |
|
|
|
|
if not highRange then |
|
|
|
|
highNum = lowRange |
|
|
|
|
lowNum = 1 |
|
|
|
|
@ -111,10 +112,7 @@ Bastion:RegisterLibrary(Bastion.Library:New({ |
|
|
|
|
for i = 1, 10 do |
|
|
|
|
rtnVal = math.random(#choices) -- iterate a few times for random randomness |
|
|
|
|
end |
|
|
|
|
if divisor then |
|
|
|
|
return choices[rtnVal] / divisor |
|
|
|
|
end |
|
|
|
|
return choices[rtnVal] |
|
|
|
|
return choices[rtnVal] / divisor |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
return Math |
|
|
|
|
|