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
@ -46,10 +46,8 @@ local function randomDirection(len_min, len_max)
|
|||||||
|
|
||||||
assert(len_max > 0, "len_max must be greater than zero")
|
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")
|
assert(len_max >= len_min, "len_max must be greater than or equal to len_min")
|
||||||
|
|
||||||
local range = len_max - len_min
|
return fromPolar(math.random() * 2*math.pi,
|
||||||
local rnd = math.random() * range
|
|
||||||
return fromPolar(math.random()*2*math.pi,
|
|
||||||
math.random() * (len_max-len_min) + len_min)
|
math.random() * (len_max-len_min) + len_min)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user