From 581b995c54fe468e4977f8771a4ddb36ba4921ce Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 21 Dec 2016 01:29:58 +0000 Subject: numeric.c: rdoc of half option [ci skip] * numeric.c (flo_round): [DOC] mention half option. [Bug #12548] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- numeric.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'numeric.c') diff --git a/numeric.c b/numeric.c index dabcdc39de..d68c54493f 100644 --- a/numeric.c +++ b/numeric.c @@ -2223,6 +2223,12 @@ rb_int_truncate(VALUE num, int ndigits) * 34567.89.round(2) #=> 34567.89 * 34567.89.round(3) #=> 34567.89 * + * If half: optional keyword is given, just-half number + * will be rounded according to that value. If it is + * :up or +nil+, the result will be rounded up, or it is + * :even, the result will be rounded to nearest even + * number, or it is :down, the result will be rounded + * down. */ static VALUE -- cgit v1.2.3