HEX
Server: Apache
System: Windows NT MAGNETO-ARM 10.0 build 22000 (Windows 10) AMD64
User: Michel (0)
PHP: 7.4.7
Disabled: NONE
Upload Files
File: C:/Ruby27-x64/share/ri/2.7.0/system/Rational/truncate-i.ri
U:RDoc::AnyMethod[iI"
truncate:ETI"Rational#truncate;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I".Returns +rat+ truncated (toward zero) to ;TI":a precision of +ndigits+ decimal digits (default: 0).;To:RDoc::Markup::BlankLineo;
;	[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).truncate      #=> 3
;TI"%Rational(2, 3).truncate   #=> 0
;TI"&Rational(-3, 2).truncate  #=> -1
;TI"
;TI".  #    decimal      -  1  2  3 . 4  5  6
;TI"-  #                   ^  ^  ^  ^   ^  ^
;TI"-  #   precision      -3 -2 -1  0  +1 +2
;TI"
;TI"8Rational('-123.456').truncate(+1).to_f  #=> -123.4
;TI"5Rational('-123.456').truncate(-1)       #=> -120;T:@format0:
@fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"6rat.truncate([ndigits])  ->  integer or rational
;T0[I"(*args);T@$FI"
Rational;TcRDoc::NormalClass00