8 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto c2f929ad0f Move default Integer#/ from rational.c to complex.c. 2021-03-27 12:38:16 +09:00
Yukihiro "Matz" Matsumoto 01a8edea35 complex.rb: add test for arithmetic operators. [ci skip]
Tests for (`Float` or `Integer`) `op` `Complex`. Also added test
dependency to `mruby-rational` since `int_div` definition relies on
`Rational` when `MRB_USE_RATIONAL` is defined.
2021-03-26 17:20:25 +09:00
Yukihiro "Matz" Matsumoto 68cf8346cd Use global defines for Rational and Complex. 2021-03-22 10:59:35 +09:00
Yukihiro "Matz" Matsumoto d3184e4a6d complex.c: overhaul complex operators.
- define `MRB_TT_COMPLEX`
- change object structure (`struct RComplex`)
- add memory management for `MRB_TT_COMPLEX`
- avoid operator overloading as much as possible
- as a result, performance improved a log
- should work with and without `Rational` defined
2021-03-19 10:37:10 +09:00
KOBAYASHI Shuji 4bdb1eb5aa Drop dependencies from mruby-complex to some gems 2019-12-15 22:51:07 +09:00
Ukrainskiy Sergey fa45cc4272 Fix dependencies 2019-05-15 16:57:21 +09:00
Ukrainskiy Sergey d67d2ae8e8 Basic implementation of Complex and Rational classes 2019-05-15 16:57:21 +09:00
Ukrainskiy Sergey 8808219e6d Initial suffix support 2019-05-15 16:57:21 +09:00