D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Complex
/
Filename :
numerator-i.ri
back
Copy
U:RDoc::AnyMethod[iI"numerator:ETI"Complex#numerator;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"=Returns the \Complex object created from the numerators ;TI"0of the real and imaginary parts of +self+, ;TI"'after converting each part to the ;TI"Z{lowest common denominator}[https://en.wikipedia.org/wiki/Lowest_common_denominator] ;TI"of the two:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"Kc = Complex.rect(Rational(2, 3), Rational(3, 4)) # => ((2/3)+(3/4)*i) ;TI"Bc.numerator # => (8+9i) ;T:@format0o; ; [ I"LIn this example, the lowest common denominator of the two parts is 12; ;TI"Ythe two converted parts may be thought of as \Rational(8, 12) and \Rational(9, 12), ;TI"2whose numerators, respectively, are 8 and 9; ;TI"Rso the returned value of <tt>c.numerator</tt> is <tt>Complex.rect(8, 9)</tt>.;T@o; ; [I""Related: Complex#denominator.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"numerator -> new_complex ;T0[ I"();T@ FI"Complex;TcRDoc::NormalClass00