diff options
| author | KOBAYASHI Shuji <[email protected]> | 2019-05-26 20:17:03 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2019-05-26 20:17:03 +0900 |
| commit | 0bdb185a6fc1a6440b90b015bdb9d137db57ab77 (patch) | |
| tree | da60ea6f0530233eced9213160fcddae56d47793 /mrbgems/mruby-complex/src/complex.c | |
| parent | 4261ba944330f27dcb80e5e4580f73bd6b3a7106 (diff) | |
| download | mruby-0bdb185a6fc1a6440b90b015bdb9d137db57ab77.tar.gz mruby-0bdb185a6fc1a6440b90b015bdb9d137db57ab77.zip | |
Add `Complex.rect`
Diffstat (limited to 'mrbgems/mruby-complex/src/complex.c')
| -rw-r--r-- | mrbgems/mruby-complex/src/complex.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mrbgems/mruby-complex/src/complex.c b/mrbgems/mruby-complex/src/complex.c index 0678d4b26..5371332cd 100644 --- a/mrbgems/mruby-complex/src/complex.c +++ b/mrbgems/mruby-complex/src/complex.c @@ -126,6 +126,7 @@ void mrb_mruby_complex_gem_init(mrb_state *mrb) //MRB_SET_INSTANCE_TT(comp, MRB_TT_ISTRUCT); mrb_undef_class_method(mrb, comp, "new"); mrb_define_class_method(mrb, comp, "rectangular", complex_s_rect, MRB_ARGS_REQ(1)|MRB_ARGS_OPT(1)); + mrb_define_class_method(mrb, comp, "rect", complex_s_rect, MRB_ARGS_REQ(1)|MRB_ARGS_OPT(1)); mrb_define_method(mrb, mrb->kernel_module, "Complex", complex_s_rect, MRB_ARGS_REQ(1)|MRB_ARGS_OPT(1)); mrb_define_method(mrb, comp, "real", complex_real, MRB_ARGS_NONE()); mrb_define_method(mrb, comp, "imaginary", complex_imaginary, MRB_ARGS_NONE()); |
