mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Code style fixes.
This commit is contained in:
@@ -389,7 +389,7 @@ function vector.random_direction()
|
||||
local x, y, z, l2
|
||||
repeat -- expected less than two attempts on average (volume sphere vs. cube)
|
||||
x, y, z = math.random() * 2 - 1, math.random() * 2 - 1, math.random() * 2 - 1
|
||||
l2 = x*x + y*y + z*z
|
||||
l2 = x*x + y*y + z*z
|
||||
until l2 <= 1 and l2 >= 1e-6
|
||||
-- normalize
|
||||
local l = math.sqrt(l2)
|
||||
|
Reference in New Issue
Block a user