Forum: Ruby-dev [ruby-trunk - Bug #6927][Open] 日本語ドキュメントにおける Math.#atan2 について

Posted by n.arita (Naoki Arita) (Guest)
on 2012-08-27 14:01
(Received via mailing list)
Issue #6927 has been reported by n.arita (Naoki Arita).

----------------------------------------
Bug #6927: 日本語ドキュメントにおける Math.#atan2 について
https://bugs.ruby-lang.org/issues/6927

Author: n.arita (Naoki Arita)
Status: Open
Priority: Low
Assignee:
Category:
Target version:
ruby -v: 1.9.3p0


=begin

現在提供されている 1.8.7 / 1.9.2 / 1.9.3 版の日本語のドキュメントにおける
Math.#atan2 の記述について報告させていただきます。
* http://doc.ruby-lang.org/ja/1.9.3/class/Math.html
* http://doc.ruby-lang.org/ja/1.9.3/method/Math/m/atan2.html

ドキュメントによると、返す値は [-pi/2, pi/2] であると記述されていますが、
[-pi, pi] の間違いではないでしょうか。

 $ ruby -v
 ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

 $ ruby -e "puts (-Math::PI/2.0 .. Math::PI/2.0).include?(Math.atan2(1, 
-1))"
 false

なお、昔のドキュメント及び英語版の記述は問題ありませんでした。
* http://www.ruby-lang.org/ja/old-man/html/Math.html
* http://ruby-doc.org/core-1.9.3/Math.html#method-c-atan2


また、 atan2(y, x) として y / x の逆正接と表現することが多いように感じます。
=end
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.