Method: Color::RGB#-@
- Defined in:
- lib/color/rgb.rb
#-@ ⇒ Object
Numerically negate the color. This results in a color that is only usable for subtraction.
558 559 560 561 562 563 564 |
# File 'lib/color/rgb.rb', line 558 def -@ rgb = self.dup rgb.instance_variable_set(:@r, -rgb.r) rgb.instance_variable_set(:@g, -rgb.g) rgb.instance_variable_set(:@b, -rgb.b) rgb end |