1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Code style fixes.

This commit is contained in:
SFENCE 2024-09-04 19:15:39 +02:00 committed by sfence
parent 24e9db07ec
commit af3f696423
43 changed files with 493 additions and 484 deletions

View file

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