Bug #37

Math.#hypot の説明

Added by Ken DATE over 3 years ago. Updated 9 months ago.

[ruby-reference-manual:813]
Status:Closed Start date:02/13/2008
Priority:Low Due date:
Assignee:- % Done:

100%

Category:doc
Target version:-
reporter:rock ruby_version:1.8, 1.9

Description

Math.#hypot の説明の最後に,

  つまり x と y を直交する二辺とする直角三角形の斜辺(hypotenuse)の長さを返します。

くらい入れてもいいと思います。また

  hypot(3, 4) #=> 5.0

のような実行例も欲しいです。

Associated revisions

Revision 4153
Added by okkez over 1 year ago

fix #37

History

Updated by 5 5 almost 2 years ago

  • Status changed from Open to Closed
  • ruby_version changed from 1.9 to 1.8, 1.9
いつの間にか修正されていたので close します。

Updated by 5 5 almost 2 years ago

  • Status changed from Closed to Open
すみません,「いつの間にか修正されていた」と思ったのは勘違いでした。
パッチを付けておきます。

Index: refm/api/src/_builtin/Math
===================================================================
--- refm/api/src/_builtin/Math	(revision 4063)
+++ refm/api/src/_builtin/Math	(working copy)
@@ -186,10 +186,13 @@
 --- hypot(x, y) -> Float

 sqrt(x*x + y*y) を返します。
+この値は x, y を直交する 2 辺とする直角三角形の斜辺(hypotenuse)の長さです。

 @param x 実数
 @param y 実数

+ Math.hypot(3, 4) #=> 5.0
+
 #@end

 --- ldexp(x, exp) -> Float

Updated by okkez _ over 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100
This issue was solved with changeset r4153.
Ken, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

Also available in: Atom PDF