diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-08-07 05:05:04 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-08-07 05:05:04 +0000 |
commit | c67251edb478509b4abd9910e0b499a116112a3c (patch) | |
tree | 81d59bfb40b0efc64b3acfc9cbe4dd7d3628af85 /lib/complex.rb | |
parent | 14fe04bdacfb1bbe1e568c4e1dd4092a64c5ede7 (diff) | |
download | ruby-c67251edb478509b4abd9910e0b499a116112a3c.tar.gz |
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/complex.rb')
-rw-r--r-- | lib/complex.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/complex.rb b/lib/complex.rb index 733e4530e3..cb0a3dc564 100644 --- a/lib/complex.rb +++ b/lib/complex.rb @@ -125,12 +125,12 @@ class Complex < Numeric def / (other) if other.kind_of?(Complex) - self * other.conjugate / other.abs2 + self*other.conjugate/other.abs2 elsif Complex.generic?(other) - Complex(@real / other, @image / other) + Complex(@real/other, @image/other) else - x , y = other.coerce(self) - x / y + x, y = other.coerce(self) + x/y end end @@ -171,8 +171,8 @@ class Complex < Numeric r, theta = polar Complex.polar(r.power!(other), theta * other) else - x , y = other.coerce(self) - x / y + x, y = other.coerce(self) + x/y end end |