Sha256: 3bbfefa87f9436afd710eb870736e752da1895908744b1a53b7d054702d159e4

Contents?: true

Size: 318 Bytes

Versions: 8

Compression:

Stored size: 318 Bytes

Contents

require 'cmath'

unless defined?(Math.exp!)
  Object.instance_eval{remove_const :Math}
  Math = CMath
end

def Complex.generic? (other)
  other.kind_of?(Integer) ||
  other.kind_of?(Float)   ||
  other.kind_of?(Rational)
end

class Complex

  alias image imag

end

class Numeric

  def im() Complex(0, self) end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shoesgem-0.1514.0 shoes/ruby/lib/complex.rb
shoesgem-0.1480.0 shoes/ruby/lib/complex.rb
shoesgem-0.1469.0 shoes/ruby/lib/complex.rb
shoesgem-0.1430.0 shoes/ruby/lib/complex.rb
shoesgem-0.1429.0 shoes/ruby/lib/complex.rb
shoesgem-0.1428.0 shoes/ruby/lib/complex.rb
shoesgem-0.1426.0 shoes/ruby/lib/complex.rb
shoesgem-0.1424.0 shoes/ruby/lib/complex.rb