Permalink
Browse files

Eliminated enormous ternary from building windows.

  • Loading branch information...
1 parent e1b554c commit 0d991137c889c3f08b3561862c58216014b7fa41 @pda committed Jan 15, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 asc.rb
View
@@ -243,8 +243,11 @@ def pixel x, y, rx, ry, ticks
elsif rx == width - 1
Pixel.new "|", 234, 236
else
- rx % @period >= @period - @window_width && ry % 5 >= 2 ?
- Pixel.new(" ", 255, 232) : Pixel.new(":", 235, @color)
+ if rx % @period >= @period - @window_width && ry % 5 >= 2
+ Pixel.new(" ", 255, 232)
+ else
+ Pixel.new(":", 235, @color)
+ end
end
end
end

0 comments on commit 0d99113

Please sign in to comment.