Skip to content

Commit

Permalink
Fix red component of random color
Browse files Browse the repository at this point in the history
The red component was being divided by 100 twice, yielding a color with almost no red component. Removes the second division.
  • Loading branch information
benstiglitz committed Sep 21, 2015
1 parent d93f30c commit a735701
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/Paint/app/paint_view.rb
Expand Up @@ -28,7 +28,7 @@ def touchesBegan(touches, withEvent:event)
bp.lineWidth = 3.0
random_color = begin
red, green, blue = rand(100)/100.0, rand(100)/100.0, rand(100)/100.0
UIColor.alloc.initWithRed(red/100.0, green:green, blue:blue, alpha:1.0)
UIColor.alloc.initWithRed(red, green:green, blue:blue, alpha:1.0)
end
@paths << [bp, random_color]
end
Expand Down

0 comments on commit a735701

Please sign in to comment.