Method: Complex#-

Defined in:
ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb

#-(rhs) ⇒ Object



30
31
32
33
34
35
36
# File 'ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb', line 30

def -(rhs)
  if rhs.is_a? Complex
    Complex(real - rhs.real, imaginary - rhs.imaginary)
  elsif rhs.is_a? Numeric
    Complex(real - rhs, imaginary)
  end
end