mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-26 00:53:00 +00:00
parent
d9069b3cfa
commit
d7f328c65b
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
--- Overlap command. Places a specified node on top of
|
--- Overlap command. Places a specified node on top of
|
||||||
-- @module worldeditadditions.overlay
|
-- @module worldeditadditions.overlay
|
||||||
|
|
||||||
--- Generates a torus shape at the given position with the given parameters.
|
--- Generates a torus shape at the given position with the given parameters.
|
||||||
|
@ -56,7 +56,7 @@ function worldeditadditions.torus(position, major_radius, minor_radius, target_n
|
||||||
-- Where:
|
-- Where:
|
||||||
-- (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 = (x_sq+y_sq+z_sq - (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-z_sq)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue