红包第13次修改
This commit is contained in:
@@ -77,7 +77,7 @@ if leftCount == 1 then
|
||||
else
|
||||
-- 随机算法:二倍均值法,保证公平性
|
||||
local maxAmount = leftAmount / leftCount * 2
|
||||
amount = math.random(1, math.floor(maxAmount * 100)) / 100
|
||||
amount = math.random(1, math.floor(maxAmount))
|
||||
-- 确保金额不会超过剩余金额
|
||||
if amount > leftAmount then
|
||||
amount = leftAmount
|
||||
|
||||
Reference in New Issue
Block a user