diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-24 00:10:53 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-24 00:10:53 +0000 |
commit | af9398ab38fa7b1f177b3079c80eb1131a2d693b (patch) | |
tree | 17f0c40e39e05cb41b308a4fe0f97451ba5cae0f /complex.c | |
parent | 45c6daeed7e02fab59bf9aedcaf42be64b4ea61d (diff) | |
download | ruby-af9398ab38fa7b1f177b3079c80eb1131a2d693b.tar.gz |
* complex.c (Init_Complex): Document Complex::I. Patch by Sylvain
Daubert. [Feature #5623]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r-- | complex.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1981,6 +1981,9 @@ Init_Complex(void) rb_define_method(rb_cFloat, "angle", float_arg, 0); rb_define_method(rb_cFloat, "phase", float_arg, 0); + /* + * (0+1i) + */ rb_define_const(rb_cComplex, "I", f_complex_new_bang2(rb_cComplex, ZERO, ONE)); } |