summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2017-08-31 20:10:08 +0200
committersfan5 <sfan5@live.de>2017-08-31 20:10:08 +0200
commite680d8087eaf2936ad71d64b23499724b346666a (patch)
treef26cb3ce5426db69dc27d9f93a2db522dc22b54a
parent870873ad151defd9ed59ddf5e4937a58166704d8 (diff)
Fix small logic error in worldedit.cylinder
-rw-r--r--worldedit/primitives.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/worldedit/primitives.lua b/worldedit/primitives.lua
index 4a09fba..1b1b685 100644
--- a/worldedit/primitives.lua
+++ b/worldedit/primitives.lua
@@ -171,7 +171,7 @@ function worldedit.cylinder(pos, axis, length, radius1, radius2, node_name, holl
local count = 0
for i = 0, length - 1 do
-- Calulate radius for this "height" in the cylinder
- local radius = radius1 + (radius2 - radius1) * (i - 1) / (length - 1)
+ local radius = radius1 + (radius2 - radius1) * i / (length - 1)
radius = math.floor(radius + 0.5) -- round
local min_radius, max_radius = radius * (radius - 1), radius * (radius + 1)