Method: Complex#*
- Defined in:
- ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb
#*(rhs) ⇒ Object
38 39 40 41 42 43 44 |
# File 'ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb', line 38 def *(rhs) if rhs.is_a? Complex Complex(real * rhs.real - imaginary * rhs.imaginary, real * rhs.imaginary + rhs.real * imaginary) elsif rhs.is_a? Numeric Complex(real * rhs, imaginary * rhs) end end |