--- a/Complex.st Sun May 26 10:58:01 2019 +0200
+++ b/Complex.st Sun May 26 10:58:32 2019 +0200
@@ -596,11 +596,14 @@
"
!
-= aNumber
+= anObject
"return true, if the argument represents the same numeric value
as the receiver, false otherwise."
- ^ aNumber equalFromComplex:self
+ anObject class == self class ifTrue:[
+ ^ (real = anObject real) and:[ (imaginary = anObject imaginary)]
+ ].
+ ^ anObject equalFromComplex:self
"
(Complex real:1.0 imaginary:2.0) = (Complex real:1.0 imaginary:2.0)
@@ -608,6 +611,7 @@
"
"Modified (comment): / 12-06-2017 / 20:43:41 / cg"
+ "Modified: / 26-05-2019 / 10:04:33 / Claus Gittinger"
!
hash