Skip to content

Commit

Permalink
Fix small logic error in worldedit.cylinder
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Aug 31, 2017
1 parent 870873a commit e680d80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worldedit/primitives.lua
Expand Up @@ -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)

Expand Down

0 comments on commit e680d80

Please sign in to comment.