diff options
author | gogotanaka <gogotanaka@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-21 12:32:09 +0000 |
---|---|---|
committer | gogotanaka <gogotanaka@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-21 12:32:09 +0000 |
commit | 9f2922bdcd27453bf5814f4d8703ee55635ed033 (patch) | |
tree | 5c2962ec5bfc82c3736dd0fdeebe075c75e0cc04 | |
parent | e458cf52336bab8ef00713ab309c22895935b7ab (diff) | |
download | ruby-9f2922bdcd27453bf5814f4d8703ee55635ed033.tar.gz |
complex.c: [DOC] mention about Complex literal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | complex.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2088,9 +2088,10 @@ float_arg(VALUE self) * and i is imaginary unit. Real a equals complex a+0i * mathematically. * - * In ruby, you can create complex object with Complex, Complex::rect, - * Complex::polar or to_c method. + * Complex object can be created as literal, and also by using + * Kernel#Complex, Complex::rect, Complex::polar or to_c method. * + * 2+1i #=> (2+1i) * Complex(1) #=> (1+0i) * Complex(2, 3) #=> (2+3i) * Complex.polar(2, 3) #=> (-1.9799849932008908+0.2822400161197344i) |