summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-12 11:06:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-12 11:06:48 +0000
commitc6ef5bc31e547ee905e5a218d293fef61647f65c (patch)
tree41946c0e67681b398e6db7d07713b364d881bfd3 /include
parentdc8afd385de88dfc77ed9d246f9664b87420eb03 (diff)
complex.c: new APIs for Complex
[Feature #15066] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/intern.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index f3212aef09..7908340397 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -190,6 +190,22 @@ VALUE rb_complex_new(VALUE, VALUE);
#define rb_complex_new2(x,y) rb_complex_new((x), (y))
VALUE rb_complex_new_polar(VALUE abs, VALUE arg);
DEPRECATED_BY(rb_complex_new_polar, VALUE rb_complex_polar(VALUE abs, VALUE arg));
+VALUE rb_complex_real(VALUE z);
+VALUE rb_complex_imag(VALUE z);
+VALUE rb_complex_plus(VALUE x, VALUE y);
+VALUE rb_complex_minus(VALUE x, VALUE y);
+VALUE rb_complex_mul(VALUE x, VALUE y);
+VALUE rb_complex_div(VALUE x, VALUE y);
+VALUE rb_complex_uminus(VALUE z);
+VALUE rb_complex_conjugate(VALUE z);
+VALUE rb_complex_abs(VALUE z);
+VALUE rb_complex_arg(VALUE z);
+VALUE rb_complex_pow(VALUE base, VALUE exp);
+VALUE rb_dbl_complex_new(double real, double imag);
+#define rb_complex_add rb_complex_plus
+#define rb_complex_sub rb_complex_minus
+#define rb_complex_nagate rb_complex_uminus
+
VALUE rb_Complex(VALUE, VALUE);
#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
#define rb_Complex2(x,y) rb_Complex((x), (y))