D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Rational
/
Filename :
ceil-i.ri
back
Copy
U:RDoc::AnyMethod[iI" ceil:ETI"Rational#ceil;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"EReturns the smallest number greater than or equal to +rat+ 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"4Returns a rational when +ndigits+ is positive, ;TI""otherwise returns an integer.;T@o:RDoc::Markup::Verbatim; [I"!Rational(3).ceil #=> 3 ;TI"!Rational(2, 3).ceil #=> 1 ;TI""Rational(-3, 2).ceil #=> -1 ;TI" ;TI". # decimal - 1 2 3 . 4 5 6 ;TI"- # ^ ^ ^ ^ ^ ^ ;TI"- # precision -3 -2 -1 0 +1 +2 ;TI" ;TI"4Rational('-123.456').ceil(+1).to_f #=> -123.4 ;TI"1Rational('-123.456').ceil(-1) #=> -120;T:@format0: @fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"2rat.ceil([ndigits]) -> integer or rational ;T0[ I"(*args);T@$FI" Rational;TcRDoc::NormalClass00