aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cmath.rb
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-07 13:46:56 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-07 13:46:56 +0000
commit27174800d460c9aa7fac49d90428a6cb01f2d66c (patch)
tree8f2d191d2c3b67134539b64b4ba95c2f46984c58 /lib/cmath.rb
parent2a0342a442936bcc1e9704b388ae19bd52103db1 (diff)
downloadruby-27174800d460c9aa7fac49d90428a6cb01f2d66c.tar.gz
* lib/cmath.rb (log): avoided redundant expression.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cmath.rb')
-rw-r--r--lib/cmath.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/cmath.rb b/lib/cmath.rb
index 95a30c336b..5b261ed6a8 100644
--- a/lib/cmath.rb
+++ b/lib/cmath.rb
@@ -38,8 +38,7 @@ module CMath
if z.real? and z >= 0 and (b.nil? or b >= 0)
log!(*args)
else
- r, theta = z.polar
- a = Complex(log!(r.abs), theta)
+ a = Complex(log!(z.abs), z.arg)
if b
a /= log(b)
end