mirror of
https://github.com/vrld/hump.git
synced 2024-11-23 12:24:19 +00:00
Merge pull request #88 from grunkgrunk/patch-1
Removed unused variables from randomDirection
This commit is contained in:
commit
88f501bc77
@ -47,9 +47,7 @@ local function randomDirection(len_min, len_max)
|
||||
assert(len_max > 0, "len_max must be greater than zero")
|
||||
assert(len_max >= len_min, "len_max must be greater than or equal to len_min")
|
||||
|
||||
local range = len_max - len_min
|
||||
local rnd = math.random() * range
|
||||
return fromPolar(math.random()*2*math.pi,
|
||||
return fromPolar(math.random() * 2*math.pi,
|
||||
math.random() * (len_max-len_min) + len_min)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user