D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Integer
/
Filename :
divmod-i.ri
back
Copy
U:RDoc::AnyMethod[iI"divmod:ETI"Integer#divmod;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"5Returns a 2-element array <tt>[q, r]</tt>, where;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"*q = (self/other).floor # Quotient ;TI"+r = self % other # Remainder ;T:@format0o; ; [I"Examples:;T@o;; [I"+11.divmod(4) # => [2, 3] ;TI"-11.divmod(-4) # => [-3, -1] ;TI",-11.divmod(4) # => [-3, 1] ;TI",-11.divmod(-4) # => [2, -3] ;TI" ;TI"+12.divmod(4) # => [3, 0] ;TI",12.divmod(-4) # => [-3, 0] ;TI",-12.divmod(4) # => [-3, 0] ;TI"+-12.divmod(-4) # => [3, 0] ;TI" ;TI"-13.divmod(4.0) # => [3, 1.0] ;TI".13.divmod(Rational(4, 1)) # => [3, (1/1)];T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"divmod(other) -> array ;T0[ I" (p1);T@$FI"Integer;TcRDoc::NormalClass00