1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-08-07 05:05:04 +00:00
parent 14fe04bdac
commit c67251edb4
23 changed files with 244 additions and 83 deletions

View file

@ -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