diff options
| author | BurdetteLamar <burdettelamar@yahoo.com> | 2025-11-21 12:46:03 +0000 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-11-21 14:11:54 -0800 |
| commit | b47b37c12cf30b06ec5afc365f3739b0744b3f4c (patch) | |
| tree | 4f423bb7e727b859620f639db035892d775e257c /complex.c | |
| parent | 2289961b485b1cbf7b1012693722c16a6cdb4cda (diff) | |
[DOC] Harmonize #* methods
Diffstat (limited to 'complex.c')
| -rw-r--r-- | complex.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -913,15 +913,16 @@ comp_mul(VALUE areal, VALUE aimag, VALUE breal, VALUE bimag, VALUE *real, VALUE /* * call-seq: - * complex * numeric -> new_complex + * self * other -> numeric * - * Returns the product of +self+ and +numeric+: + * Returns the numeric product of +self+ and +other+: * + * Complex.rect(9, 8) * 4 # => (36+32i) + * Complex.rect(20, 9) * 9.8 # => (196.0+88.2i) * Complex.rect(2, 3) * Complex.rect(2, 3) # => (-5+12i) * Complex.rect(900) * Complex.rect(1) # => (900+0i) * Complex.rect(-2, 9) * Complex.rect(-9, 2) # => (0-85i) - * Complex.rect(9, 8) * 4 # => (36+32i) - * Complex.rect(20, 9) * 9.8 # => (196.0+88.2i) + * Complex.rect(9, 8) * Rational(2, 3) # => ((6/1)+(16/3)*i) * */ VALUE |
