D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Integer
/
Filename :
truncate-i.ri
back
Copy
U:RDoc::AnyMethod[iI" truncate:ETI"Integer#truncate;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"/Returns +self+ truncated (toward zero) to ;TI"-a precision of +ndigits+ decimal digits.;To:RDoc::Markup::BlankLine o; ; [I"4When +ndigits+ is negative, the returned value ;TI"6has at least <tt>ndigits.abs</tt> trailing zeros:;T@o:RDoc::Markup::Verbatim; [I" 555.truncate(-1) # => 550 ;TI" 555.truncate(-2) # => 500 ;TI"!-555.truncate(-2) # => -500 ;T:@format0o; ; [I"7Returns +self+ when +ndigits+ is zero or positive.;T@o;; [I"555.truncate # => 555 ;TI"555.truncate(50) # => 555 ;T; 0o; ; [I"Related: Integer#round.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"&truncate(ndigits = 0) -> integer ;T0[ I"(*args);T@#FI"Integer;TcRDoc::NormalClass00