Update torus.lua

This commit is contained in:
VorTechnix 2021-05-17 18:57:51 -07:00
parent ec1623b230
commit cb841bfb80

View file

@ -59,8 +59,8 @@ function worldeditadditions.torus(position, major_radius, minor_radius, target_n
-- (x, y, z) is the point -- (x, y, z) is the point
-- a is the major radius (centre to centre of circle) -- a is the major radius (centre to centre of circle)
-- b is the minor radius (radius of circle) -- b is the minor radius (radius of circle)
local comp_a = (x_sq+y_sq+z_sq - (major_radius_sq+minor_radius_sq)) local comp_a = (sq.x+sq.y+sq.z - (major_radius_sq+minor_radius_sq))
local test_value = comp_a*comp_a - 4*major_radius*minor_radius*(minor_radius_sq-z_sq) local test_value = comp_a*comp_a - 4*major_radius*minor_radius*(minor_radius_sq-sq.z)
-- If we're inside the torus, then fill it in -- If we're inside the torus, then fill it in
if test_value <= 1 then if test_value <= 1 then