diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-08 10:51:14 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-08 10:51:14 +0000 |
commit | b85ed255fafe48e3d435eee31d6403af5558afb9 (patch) | |
tree | f1bda9441f3f4fea8eb06a53f6f85c003062e2a4 | |
parent | c36ad781ef177e1d3e44b662951dc6b399438e0d (diff) | |
download | ruby-b85ed255fafe48e3d435eee31d6403af5558afb9.tar.gz |
update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | complex.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -576,6 +576,11 @@ f_complex_polar(VALUE klass, VALUE x, VALUE y) * Complex.polar(abs[, arg]) -> complex * * Returns a complex object which denotes the given polar form. + * + * Complex.polar(3, 0) #=> (3.0+0.0i) + * Complex.polar(3, Math::PI/2) #=> (1.836909530733566e-16+3.0i) + * Complex.polar(3, Math::PI) #=> (-3.0+3.673819061467132e-16i) + * Complex.polar(3, -Math::PI/2) #=> (1.836909530733566e-16-3.0i) */ static VALUE nucomp_s_polar(int argc, VALUE *argv, VALUE klass) @@ -985,6 +990,9 @@ nucomp_abs2(VALUE self) * cmp.phase -> float * * Returns the angle part of its polar form. + * + * Complex.polar(3, Math::PI/2).arg #=> 1.5707963267948966 + * */ static VALUE nucomp_arg(VALUE self) |