mirror of
https://github.com/HybridDog/vector_extras.git
synced 2024-11-26 09:23:47 +01:00
may work faster
This commit is contained in:
parent
1af07d4b59
commit
8371cc84d9
4
init.lua
4
init.lua
@ -151,8 +151,8 @@ function vector.sun_dir(time)
|
|||||||
or t > 0.75 then
|
or t > 0.75 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local tmp = math.pi*(2*t-0.5)
|
local tmp = math.cos(math.pi*(2*t-0.5))
|
||||||
return {x=math.cos(tmp), y=math.sin(tmp), z=0}
|
return {x=tmp, y=math.sqrt(1-tmp*tmp), z=0}
|
||||||
end
|
end
|
||||||
|
|
||||||
function vector.inside(pos, minp, maxp)
|
function vector.inside(pos, minp, maxp)
|
||||||
|
Loading…
Reference in New Issue
Block a user