ruby-changes:14784
From: akr <ko1@a...>
Date: Thu, 11 Feb 2010 22:31:03 +0900 (JST)
Subject: [ruby-changes:14784] Ruby:r26646 (trunk): update rdoc.
akr 2010-02-11 22:30:55 +0900 (Thu, 11 Feb 2010) New Revision: 26646 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26646 Log: update rdoc. Modified files: trunk/numeric.c Index: numeric.c =================================================================== --- numeric.c (revision 26645) +++ numeric.c (revision 26646) @@ -1372,8 +1372,26 @@ * Precision may be negative. Returns a floating point number when ndigits * is more than one. * + * 1.4.round #=> 1 * 1.5.round #=> 2 + * 1.6.round #=> 2 * (-1.5).round #=> -2 + * + * 1.234567.round(2) #=> 1.23 + * 1.234567.round(3) #=> 1.235 + * 1.234567.round(4) #=> 1.2346 + * 1.234567.round(5) #=> 1.23457 + * + * 34567.89.round(-5) #=> 0 + * 34567.89.round(-4) #=> 30000 + * 34567.89.round(-3) #=> 35000 + * 34567.89.round(-2) #=> 34600 + * 34567.89.round(-1) #=> 34570 + * 34567.89.round(0) #=> 34568 + * 34567.89.round(1) #=> 34567.9 + * 34567.89.round(2) #=> 34567.89 + * 34567.89.round(3) #=> 34567.89 + * */ static VALUE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/