File: C:/Ruby27-x64/share/ri/2.7.0/system/Float/round-i.ri
U:RDoc::AnyMethod[iI"
round:ETI"Float#round;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"7Returns +float+ rounded to the nearest value with ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLine o;
; [I"FWhen the precision is negative, the returned value is an integer ;TI";with at least <code>ndigits.abs</code> trailing zeros.;T@o;
; [I"AReturns a floating point number when +ndigits+ is positive, ;TI""otherwise returns an integer.;T@o:RDoc::Markup::Verbatim; [I"1.4.round #=> 1
;TI"1.5.round #=> 2
;TI"1.6.round #=> 2
;TI"(-1.5).round #=> -2
;TI"
;TI""1.234567.round(2) #=> 1.23
;TI"#1.234567.round(3) #=> 1.235
;TI"$1.234567.round(4) #=> 1.2346
;TI"%1.234567.round(5) #=> 1.23457
;TI"
;TI"34567.89.round(-5) #=> 0
;TI"#34567.89.round(-4) #=> 30000
;TI"#34567.89.round(-3) #=> 35000
;TI"#34567.89.round(-2) #=> 34600
;TI"#34567.89.round(-1) #=> 34570
;TI"#34567.89.round(0) #=> 34568
;TI"%34567.89.round(1) #=> 34567.9
;TI"&34567.89.round(2) #=> 34567.89
;TI"&34567.89.round(3) #=> 34567.89
;T:@format0o;
; [I"7If the optional +half+ keyword argument is given, ;TI"Cnumbers that are half-way between two possible rounded values ;TI"Dwill be rounded according to the specified tie-breaking +mode+:;T@o:RDoc::Markup::List:
@type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o;
; [I"C<code>:up</code> or +nil+: round half away from zero (default);To;;0; [o;
; [I"/<code>:down</code>: round half toward zero;To;;0; [o;
; [I"B<code>:even</code>: round half toward the nearest even number;T@o;; [I"%2.5.round(half: :up) #=> 3
;TI"%2.5.round(half: :down) #=> 2
;TI"%2.5.round(half: :even) #=> 2
;TI"%3.5.round(half: :up) #=> 4
;TI"%3.5.round(half: :down) #=> 3
;TI"%3.5.round(half: :even) #=> 4
;TI"&(-2.5).round(half: :up) #=> -3
;TI"&(-2.5).round(half: :down) #=> -2
;TI"%(-2.5).round(half: :even) #=> -2;T;
0:
@fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"Afloat.round([ndigits] [, half: mode]) -> integer or float
;T0[ I"(p1 = v1, p2 = {});T@NFI"
Float;TcRDoc::NormalClass00