summaryrefslogtreecommitdiff
path: root/lib/complex.rb
blob: c03ee63c3ee7a3f1a7af8e2ad15986fb76399c06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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