Merge pull request #88 from grunkgrunk/patch-1

Removed unused variables from randomDirection
This commit is contained in:
Matthias Richter 2017-11-19 21:04:09 +01:00 committed by GitHub
commit 88f501bc77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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