Skip to content
Permalink
Browse files

Fix one-node high cylinders

closes #146
  • Loading branch information
sfan5 committed Sep 3, 2017
1 parent 2cb3fcd commit 2f4eb19a3afa73b95fd5ce50011c3292dec8bbc2
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 / (length - 1)
local radius = radius1 + (radius2 - radius1) * (i + 1) / length
radius = math.floor(radius + 0.5) -- round
local min_radius, max_radius = radius * (radius - 1), radius * (radius + 1)

0 comments on commit 2f4eb19

Please sign in to comment.
You can’t perform that action at this time.