⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Float
/
View File Name :
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
ndigits.abs
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
:up
or +nil+: round half away from zero (default);To;;0; [o; ; [I"/
:down
: round half toward zero;To;;0; [o; ; [I"B
:even
: 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