Skip to content

Commit 9a32610

Browse files
author
monkstone
committed
refinement?
1 parent 42faafc commit 9a32610

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

image_filtering/pixelate.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ def draw
2929
end
3030

3131
def make_even(source)
32-
(source / 2.0).floor * 2
32+
return source.floor if source.floor.even?
33+
(source / 2).floor * 2
3334
end

0 commit comments

Comments
 (0)