summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/complex.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/complex.rb b/lib/complex.rb
index fbf50ffece..808cecc95d 100644
--- a/lib/complex.rb
+++ b/lib/complex.rb
@@ -58,11 +58,7 @@ class Numeric
# See Complex#arg.
#
def arg
- if self >= 0
- return 0
- else
- return Math::PI
- end
+ Math.atan2!(0, self)
end
alias angle arg