D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Float
/
Filename :
divmod-i.ri
back
Copy
U:RDoc::AnyMethod[iI"divmod:ETI"Float#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.0.divmod(4) # => [2, 3.0] ;TI"111.0.divmod(-4) # => [-3, -1.0] ;TI"0-11.0.divmod(4) # => [-3, 1.0] ;TI"0-11.0.divmod(-4) # => [2, -3.0] ;TI" ;TI"/12.0.divmod(4) # => [3, 0.0] ;TI"012.0.divmod(-4) # => [-3, 0.0] ;TI"1-12.0.divmod(4) # => [-3, -0.0] ;TI"0-12.0.divmod(-4) # => [3, -0.0] ;TI" ;TI"/13.0.divmod(4.0) # => [3, 1.0] ;TI".13.0.divmod(Rational(4, 1)) # => [3, 1.0];T; 0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"divmod(other) -> array ;T0[ I" (p1);T@$FI" Float;TcRDoc::NormalClass00