diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-12 11:06:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-12 11:06:47 +0000 |
commit | dc8afd385de88dfc77ed9d246f9664b87420eb03 (patch) | |
tree | 4cab3cf0bb89a79c7f4dd7425b5425709d2d28db /numeric.c | |
parent | dd046c59de93e9ecda0b56ec1eca10f8b4cda73e (diff) |
complex.c: rb_complex_new_polar
* complex.c (rb_complex_new_polar): renamed with _new to clarify
that it creates a new instance, but is not an instance method.
* complex.c (rb_complex_polar): deprecated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1308,7 +1308,7 @@ rb_float_pow(VALUE x, VALUE y) dx = RFLOAT_VALUE(x); dy = RFLOAT_VALUE(y); if (dx < 0 && dy != round(dy)) - return rb_dbl_complex_polar_pi(pow(-dx, dy), dy); + return rb_dbl_complex_new_polar_pi(pow(-dx, dy), dy); } else { return rb_num_coerce_bin(x, y, idPow); @@ -4083,7 +4083,7 @@ fix_pow(VALUE x, VALUE y) if (a == 1) return DBL2NUM(1.0); { if (a < 0 && dy != round(dy)) - return rb_dbl_complex_polar_pi(pow(-(double)a, dy), dy); + return rb_dbl_complex_new_polar_pi(pow(-(double)a, dy), dy); return DBL2NUM(pow((double)a, dy)); } } |