[前][次][番号順一覧][スレッド一覧]

ruby-changes:45060

From: akr <ko1@a...>
Date: Wed, 21 Dec 2016 14:26:41 +0900 (JST)
Subject: [ruby-changes:45060] akr:r57133 (trunk): [DOC] itemize values for half option of Float#round.

akr	2016-12-21 14:26:35 +0900 (Wed, 21 Dec 2016)

  New Revision: 57133

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57133

  Log:
    [DOC] itemize values for half option of Float#round.

  Modified files:
    trunk/numeric.c
Index: numeric.c
===================================================================
--- numeric.c	(revision 57132)
+++ numeric.c	(revision 57133)
@@ -2224,11 +2224,12 @@ rb_int_truncate(VALUE num, int ndigits) https://github.com/ruby/ruby/blob/trunk/numeric.c#L2224
  *     34567.89.round(3)  #=> 34567.89
  *
  *  If <code>half:</code> optional keyword is given, just-half number
- *  will be rounded according to that value.  If it is
- *  <code>:up</code> or +nil+, the result will be rounded up, or it is
- *  <code>:even</code>, the result will be rounded to nearest even
- *  number, or it is <code>:down</code>, the result will be rounded
- *  down.
+ *  will be rounded according to that value.
+ *  Supported values for this keyword are follows.
+ *
+ *  * <code>:up</code> or +nil+: the result will be rounded away from zero
+ *  * <code>:even</code>: the result will be rounded to nearest even number
+ *  * <code>:down</code>: the result will be rounded close to zero
  */
 
 static VALUE

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]