summaryrefslogtreecommitdiffstats
path: root/complex.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-20 11:29:21 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-20 11:29:21 +0000
commit8286ccb302e001558121b81d80e8ccca7a884fb4 (patch)
treee89d12ff720a8a66fb907ac4141cb4e440a4ba84 /complex.c
parente9ff6de5872460feb04c50eb5424f9a8c1bea196 (diff)
downloadruby-8286ccb302e001558121b81d80e8ccca7a884fb4.tar.gz
ruby-8286ccb302e001558121b81d80e8ccca7a884fb4.tar.xz
ruby-8286ccb302e001558121b81d80e8ccca7a884fb4.zip
* complex.c: edited rdoc.
* numeric.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/complex.c b/complex.c
index 30c419906..c2113f23c 100644
--- a/complex.c
+++ b/complex.c
@@ -380,6 +380,13 @@ nucomp_s_canonicalize_internal(VALUE klass, VALUE real, VALUE imag)
}
}
+/*
+ * call-seq:
+ * Complex.rect(real[, imag]) => complex
+ * Complex.rectangular(real[, imag]) => complex
+ *
+ * Returns a complex object which denotes the given rectangular form.
+ */
static VALUE
nucomp_s_new(int argc, VALUE *argv, VALUE klass)
{
@@ -519,6 +526,12 @@ f_complex_polar(VALUE klass, VALUE x, VALUE y)
f_mul(x, m_sin(y)));
}
+/*
+ * call-seq:
+ * Complex.polar(abs, arg) => complex
+ *
+ * Returns a complex object which denotes the given polar form.
+ */
static VALUE
nucomp_s_polar(VALUE klass, VALUE abs, VALUE arg)
{