Skip to content

Commit 48e3ac9

Browse files
authored
Merge pull request #295 from jecisc/remove-method-extension-in-their-own-class
Some methods are extensions of their own class. This PR removes that.
2 parents 4ac4f41 + 9b86906 commit 48e3ac9

File tree

4 files changed

+14
-106
lines changed

4 files changed

+14
-106
lines changed

src/Math-Complex/PMComplexNumber.class.st

+7-7
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ PMComplexNumber class >> one [
100100
^ self real: 1 imaginary: 0
101101
]
102102

103-
{ #category : #'*Math-Complex' }
103+
{ #category : #information }
104104
PMComplexNumber class >> random [
105105
"Answers a random number with abs between 0 and 1."
106106
| random |
@@ -246,7 +246,7 @@ PMComplexNumber >> adaptToInteger: rcvr andSend: selector [
246246
^ rcvr asComplex perform: selector with: self
247247
]
248248

249-
{ #category : #'*Math-Complex' }
249+
{ #category : #'double dispatch' }
250250
PMComplexNumber >> addPolynomial: aPolynomial [
251251
^ aPolynomial addNumber: self
252252
]
@@ -510,7 +510,7 @@ PMComplexNumber >> divideSecureBy: anObject [
510510
^ anObject adaptToComplex: self andSend: #/.
511511
]
512512

513-
{ #category : #'*Math-Complex' }
513+
{ #category : #'double dispatch' }
514514
PMComplexNumber >> dividingPolynomial: aPolynomial [
515515
^ aPolynomial timesNumber: 1 / self
516516
]
@@ -613,7 +613,7 @@ PMComplexNumber >> printOn: aStream [
613613

614614
]
615615

616-
{ #category : #'*Math-Complex' }
616+
{ #category : #'double dispatch' }
617617
PMComplexNumber >> productWithVector: aVector [
618618
"Answers a new vector product of the receiver with aVector."
619619

@@ -662,7 +662,7 @@ PMComplexNumber >> raisedToInteger: operand [
662662
^ result
663663
]
664664

665-
{ #category : #'*Math-Complex' }
665+
{ #category : #information }
666666
PMComplexNumber >> random [
667667
"analog to Number>>random. However, the only bound is that the abs of the produced complex is less than the length of the receive. The receiver effectively defines a disc within which the random element can be produced."
668668
^ self class random * self
@@ -751,7 +751,7 @@ PMComplexNumber >> squaredNorm [
751751
^real * real + (imaginary * imaginary)
752752
]
753753

754-
{ #category : #'*Math-Complex' }
754+
{ #category : #'double dispatch' }
755755
PMComplexNumber >> subtractToPolynomial: aPolynomial [
756756
^ aPolynomial addNumber: self negated
757757
]
@@ -779,7 +779,7 @@ PMComplexNumber >> tanh [
779779
^self i tan i negated
780780
]
781781

782-
{ #category : #'*Math-Complex' }
782+
{ #category : #'double dispatch' }
783783
PMComplexNumber >> timesPolynomial: aPolynomial [
784784
^ aPolynomial timesNumber: self
785785
]

src/Math-Complex/PMComplexNumber.extension.st

-46
This file was deleted.

src/Math-Quaternion/PMQuaternion.class.st

+7-7
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ PMQuaternion class >> qr: qr qi: qi qj: qj qk: qk [
5555
qk: qk
5656
]
5757

58-
{ #category : #'*Math-Quaternion' }
58+
{ #category : #information }
5959
PMQuaternion class >> random [
6060
"Answers a random quaternion with abs at most one."
6161

@@ -169,7 +169,7 @@ PMQuaternion >> adaptToInteger: rcvr andSend: selector [
169169
^ rcvr asQuaternion perform: selector with: self
170170
]
171171

172-
{ #category : #'*Math-Quaternion' }
172+
{ #category : #'double dispatch' }
173173
PMQuaternion >> addPolynomial: aPolynomial [
174174
^aPolynomial addNumber: self
175175
]
@@ -233,7 +233,7 @@ PMQuaternion >> cosh [
233233
^(self exp + self negated exp) / 2
234234
]
235235

236-
{ #category : #'*Math-Quaternion' }
236+
{ #category : #'double dispatch' }
237237
PMQuaternion >> dividingPolynomial: aPolynomial [
238238
^aPolynomial timesNumber: (1 / self)
239239
]
@@ -387,7 +387,7 @@ PMQuaternion >> printOn: aStream [
387387
self storeOn: aStream
388388
]
389389

390-
{ #category : #'*Math-Quaternion' }
390+
{ #category : #'double dispatch' }
391391
PMQuaternion >> productWithVector: aVector [
392392
"Answers a new vector product of the receiver with aVector."
393393
^aVector collect: [ :each | each * self]
@@ -463,7 +463,7 @@ PMQuaternion >> raisedToInteger: operand [
463463
^ result
464464
]
465465

466-
{ #category : #'*Math-Quaternion' }
466+
{ #category : #information }
467467
PMQuaternion >> random [
468468
"analog to Number>>random. The resulting quaternion will have abs at most that of the receiver"
469469
^ self class random * self.
@@ -568,7 +568,7 @@ PMQuaternion >> storeOn: aStream [
568568
aStream nextPut: $)
569569
]
570570

571-
{ #category : #'*Math-Quaternion' }
571+
{ #category : #'double dispatch' }
572572
PMQuaternion >> subtractToPolynomial: aPolynomial [
573573
^aPolynomial addNumber: self negated
574574
]
@@ -609,7 +609,7 @@ PMQuaternion >> timesNumber: multiplier [
609609
^ self class qr: (qr * multiplier) qi: (qi * multiplier) qj: (qj * multiplier) qk: (qk * multiplier).
610610
]
611611

612-
{ #category : #'*Math-Quaternion' }
612+
{ #category : #'double dispatch' }
613613
PMQuaternion >> timesPolynomial: aPolynomial [
614614
^aPolynomial timesNumber: self
615615
]

src/Math-Quaternion/PMQuaternion.extension.st

-46
This file was deleted.

0 commit comments

Comments
 (0)