summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2025-11-21 12:46:03 +0000
committerPeter Zhu <peter@peterzhu.ca>2025-11-21 14:11:54 -0800
commitb47b37c12cf30b06ec5afc365f3739b0744b3f4c (patch)
tree4f423bb7e727b859620f639db035892d775e257c /complex.c
parent2289961b485b1cbf7b1012693722c16a6cdb4cda (diff)
[DOC] Harmonize #* methods
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/complex.c b/complex.c
index 54c8cd0d6e..d69b0a6581 100644
--- a/complex.c
+++ b/complex.c
@@ -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