Skip to content

Commit

Permalink
Fixed rounding bug in computeBB
Browse files Browse the repository at this point in the history
  • Loading branch information
chuanli11 committed Apr 20, 2016
1 parent 96a8848 commit 3d614d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mylib/helper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function computeBB(width, height, alpha)
end
end

return math.floor(min_x), math.floor(min_y), math.floor(max_x), math.floor(max_y)
return math.max(math.floor(min_x), 1), math.max(math.floor(min_y), 1), math.floor(max_x), math.floor(max_y)
end

function computegrid(width, height, block_size, block_stride, flag_all)
Expand Down

0 comments on commit 3d614d9

Please sign in to comment.