📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 05:03:06
📂
/ (Root)
/
opt
/
alt
/
ruby33
/
share
/
ri
/
system
/
Complex
📍 /opt/alt/ruby33/share/ri/system/Complex
🔄 Refresh
✏️
Editing: cdesc-Complex.ri
Read Only
U:RDoc::NormalClass[iI"Complex:ET@I"Numeric;To:RDoc::Markup::Document:@parts[o;;[#o:RDoc::Markup::Paragraph;[I"0A \Complex object houses a pair of values, ;TI"Ogiven when the object is created as either <i>rectangular coordinates</i> ;TI"!or <i>polar coordinates</i>.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading: leveli: textI"Rectangular Coordinates;T@o; ;[I"5The rectangular coordinates of a complex number ;TI"2are called the _real_ and _imaginary_ parts; ;TI"^see {Complex number definition}[https://en.wikipedia.org/wiki/Complex_number#Definition].;T@o; ;[I"HYou can create a \Complex object from rectangular coordinates with:;T@o:RDoc::Markup::List: @type:BULLET:@items[ o:RDoc::Markup::ListItem:@label0;[o; ;[I"MA {complex literal}[rdoc-ref:doc/syntax/literals.rdoc@Complex+Literals].;To;;0;[o; ;[I"\Method Complex.rect.;To;;0;[o; ;[I"\\Method Kernel#Complex, either with numeric arguments or with certain string arguments.;To;;0;[o; ;[I".\Method String#to_c, for certain strings.;T@o; ;[I"PNote that each of the stored parts may be a an instance one of the classes ;TI"+Complex, Float, Integer, or Rational; ;TI"they may be retrieved:;T@o;;;;[o;;0;[o; ;[I"ASeparately, with methods Complex#real and Complex#imaginary.;To;;0;[o; ;[I"(Together, with method Complex#rect.;T@o; ;[I"@The corresponding (computed) polar values may be retrieved:;T@o;;;;[o;;0;[o; ;[I":Separately, with methods Complex#abs and Complex#arg.;To;;0;[o; ;[I")Together, with method Complex#polar.;T@S;;i; I"Polar Coordinates;T@o; ;[I"/The polar coordinates of a complex number ;TI"5are called the _absolute_ and _argument_ parts; ;TI"asee {Complex polar plane}[https://en.wikipedia.org/wiki/Complex_number#Polar_complex_plane].;T@o; ;[I"&In this class, the argument part ;TI"Bin expressed {radians}[https://en.wikipedia.org/wiki/Radian] ;TI"C(not {degrees}[https://en.wikipedia.org/wiki/Degree_(angle)]).;T@o; ;[I"BYou can create a \Complex object from polar coordinates with:;T@o;;;;[o;;0;[o; ;[I"\Method Complex.polar.;To;;0;[o; ;[I";\Method Kernel#Complex, with certain string arguments.;To;;0;[o; ;[I".\Method String#to_c, for certain strings.;T@o; ;[I"PNote that each of the stored parts may be a an instance one of the classes ;TI"+Complex, Float, Integer, or Rational; ;TI"they may be retrieved:;T@o;;;;[o;;0;[o; ;[I":Separately, with methods Complex#abs and Complex#arg.;To;;0;[o; ;[I")Together, with method Complex#polar.;T@o; ;[I"FThe corresponding (computed) rectangular values may be retrieved:;T@o;;;;[o;;0;[o; ;[I"<Separately, with methods Complex#real and Complex#imag.;To;;0;[o; ;[I"(Together, with method Complex#rect.;T: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0o;;[ ;I"*ext/bigdecimal/lib/bigdecimal/util.rb;T;0o;;[ ;I"%ext/json/lib/json/add/complex.rb;T;0;0;0[ [U:RDoc::Constant[i I"I;TI"Complex::I;T:public0o;;[o; ;[I"Equivalent ;TI"to <tt>Complex(0, 1)</tt>:;T@o:RDoc::Markup::Verbatim;[I"Complex::I # => (0+1i);T:@format0;@�;0@�@cRDoc::NormalClass0[ [[I" class;T[[;[ [:protected[ [:private[ [I"json_create;TI"%ext/json/lib/json/add/complex.rb;T[I" polar;TI"complex.c;T[I" rect;T@�[I"rectangular;T@�[I" instance;T[[;[ [;[ [;[-[I"*;T@�[I"**;T@�[I"+;T@�[I"-;T@�[I"-@;T@�[I"/;T@�[I"<=>;T@�[I"==;T@�[I"abs;T@�[I" abs2;T@�[I" angle;T@�[I"arg;T@�[I"as_json;T@�[I" conj;T@�[I"conjugate;T@�[I"denominator;T@�[I" fdiv;T@�[I"finite?;T@�[I" hash;T@�[I" imag;T@�[I"imaginary;T@�[I"infinite?;T@�[I"inspect;T@�[I"magnitude;T@�[I"numerator;T@�[I" phase;T@�[I" polar;T@�[I"quo;T@�[I"rationalize;T@�[I" real;T@�[I" real?;T@�[@�@�[I"rectangular;T@�[I" to_c;T@�[I" to_d;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;T[I" to_f;T@�[I" to_i;T@�[I"to_json;T@�[I" to_r;T@�[I" to_s;T@�[ [U:RDoc::Context::Section[i 0o;;[ ;0;0[I"complex.c;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;TI"%ext/json/lib/json/add/complex.rb;T@�cRDoc::TopLevel
💾 Save Changes
❌ Cancel