mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* lib/complex.rb (Numeric#arg): should return NaN for NaN.
[ruby-core:24116] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3948410b04
commit
93c02c4d03
2 changed files with 6 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Jul 3 06:19:58 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/complex.rb (Numeric#arg): should return NaN for NaN.
|
||||||
|
[ruby-core:24116]
|
||||||
|
|
||||||
Wed Jul 1 15:49:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Jul 1 15:49:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c (PUSH_ANCHOR, POP_ANCHOR, rb_thread_start_0): separated
|
* eval.c (PUSH_ANCHOR, POP_ANCHOR, rb_thread_start_0): separated
|
||||||
|
|
|
@ -58,11 +58,7 @@ class Numeric
|
||||||
# See Complex#arg.
|
# See Complex#arg.
|
||||||
#
|
#
|
||||||
def arg
|
def arg
|
||||||
if self >= 0
|
Math.atan2!(0, self)
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return Math::PI
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
alias angle arg
|
alias angle arg
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue