D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Kernel
/
Filename :
Complex-i.ri
back
Copy
U:RDoc::AnyMethod[iI"Complex:ETI"Kernel#Complex;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"?Returns a new \Complex object if the arguments are valid; ;TI"=otherwise raises an exception if +exception+ is +true+; ;TI"otherwise returns +nil+.;To:RDoc::Markup::BlankLine o; ; [I"/With Numeric arguments +real+ and +imag+, ;TI"Jreturns <tt>Complex.rect(real, imag)</tt> if the arguments are valid.;T@o; ; [I"WWith string argument +s+, returns a new \Complex object if the argument is valid; ;TI"the string may have:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"$One or two numeric substrings, ;TI"Teach of which specifies a Complex, Float, Integer, Numeric, or Rational value, ;TI"Tspecifying {rectangular coordinates}[rdoc-ref:Complex@Rectangular+Coordinates]:;T@o;; ;;[o;;0; [o; ; [I":Sign-separated real and imaginary numeric substrings ;TI",(with trailing character <tt>'i'</tt>):;T@o:RDoc::Markup::Verbatim; [ I""Complex('1+2i') # => (1+2i) ;TI""Complex('+1+2i') # => (1+2i) ;TI""Complex('+1-2i') # => (1-2i) ;TI"#Complex('-1+2i') # => (-1+2i) ;TI"#Complex('-1-2i') # => (-1-2i) ;T:@format0o;;0; [o; ; [I"HReal-only numeric string (without trailing character <tt>'i'</tt>):;T@o;; [I"Complex('1') # => (1+0i) ;TI"Complex('+1') # => (1+0i) ;TI" Complex('-1') # => (-1+0i) ;T;0o;;0; [o; ; [I"JImaginary-only numeric string (with trailing character <tt>'i'</tt>):;T@o;; [I" Complex('1i') # => (0+1i) ;TI" Complex('+1i') # => (0+1i) ;TI" Complex('-1i') # => (0-1i) ;T;0o;;0; [o; ; [I"?At-sign separated real and imaginary rational substrings, ;TI"/each of which specifies a Rational value, ;TI"Hspecifying {polar coordinates}[rdoc-ref:Complex@Polar+Coordinates]:;T@o;; [ I"JComplex('1/2@3/4') # => (0.36584443443691045+0.34081938001166706i) ;TI"JComplex('+1/2@+3/4') # => (0.36584443443691045+0.34081938001166706i) ;TI"JComplex('+1/2@-3/4') # => (0.36584443443691045-0.34081938001166706i) ;TI"KComplex('-1/2@+3/4') # => (-0.36584443443691045-0.34081938001166706i) ;TI"JComplex('-1/2@-3/4') # => (-0.36584443443691045+0.34081938001166706i);T;0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0I"nComplex(real, imag = 0, exception: true) -> complex or nil Complex(s, exception: true) -> complex or nil ;T0[ I"(p1, p2 = v2, p3 = {});T@SFI"Kernel;TcRDoc::NormalModule00