Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/Math-Complex/PMComplexNumber.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ PMComplexNumber class >> one [
^ self real: 1 imaginary: 0
]

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

{ #category : #'*Math-Complex' }
{ #category : #'double dispatch' }
PMComplexNumber >> addPolynomial: aPolynomial [
^ aPolynomial addNumber: self
]
Expand Down Expand Up @@ -510,7 +510,7 @@ PMComplexNumber >> divideSecureBy: anObject [
^ anObject adaptToComplex: self andSend: #/.
]

{ #category : #'*Math-Complex' }
{ #category : #'double dispatch' }
PMComplexNumber >> dividingPolynomial: aPolynomial [
^ aPolynomial timesNumber: 1 / self
]
Expand Down Expand Up @@ -613,7 +613,7 @@ PMComplexNumber >> printOn: aStream [

]

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

Expand Down Expand Up @@ -662,7 +662,7 @@ PMComplexNumber >> raisedToInteger: operand [
^ result
]

{ #category : #'*Math-Complex' }
{ #category : #information }
PMComplexNumber >> random [
"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."
^ self class random * self
Expand Down Expand Up @@ -751,7 +751,7 @@ PMComplexNumber >> squaredNorm [
^real * real + (imaginary * imaginary)
]

{ #category : #'*Math-Complex' }
{ #category : #'double dispatch' }
PMComplexNumber >> subtractToPolynomial: aPolynomial [
^ aPolynomial addNumber: self negated
]
Expand Down Expand Up @@ -779,7 +779,7 @@ PMComplexNumber >> tanh [
^self i tan i negated
]

{ #category : #'*Math-Complex' }
{ #category : #'double dispatch' }
PMComplexNumber >> timesPolynomial: aPolynomial [
^ aPolynomial timesNumber: self
]
46 changes: 0 additions & 46 deletions src/Math-Complex/PMComplexNumber.extension.st

This file was deleted.

14 changes: 7 additions & 7 deletions src/Math-Quaternion/PMQuaternion.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ PMQuaternion class >> qr: qr qi: qi qj: qj qk: qk [
qk: qk
]

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

Expand Down Expand Up @@ -169,7 +169,7 @@ PMQuaternion >> adaptToInteger: rcvr andSend: selector [
^ rcvr asQuaternion perform: selector with: self
]

{ #category : #'*Math-Quaternion' }
{ #category : #'double dispatch' }
PMQuaternion >> addPolynomial: aPolynomial [
^aPolynomial addNumber: self
]
Expand Down Expand Up @@ -233,7 +233,7 @@ PMQuaternion >> cosh [
^(self exp + self negated exp) / 2
]

{ #category : #'*Math-Quaternion' }
{ #category : #'double dispatch' }
PMQuaternion >> dividingPolynomial: aPolynomial [
^aPolynomial timesNumber: (1 / self)
]
Expand Down Expand Up @@ -387,7 +387,7 @@ PMQuaternion >> printOn: aStream [
self storeOn: aStream
]

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

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

{ #category : #'*Math-Quaternion' }
{ #category : #'double dispatch' }
PMQuaternion >> subtractToPolynomial: aPolynomial [
^aPolynomial addNumber: self negated
]
Expand Down Expand Up @@ -609,7 +609,7 @@ PMQuaternion >> timesNumber: multiplier [
^ self class qr: (qr * multiplier) qi: (qi * multiplier) qj: (qj * multiplier) qk: (qk * multiplier).
]

{ #category : #'*Math-Quaternion' }
{ #category : #'double dispatch' }
PMQuaternion >> timesPolynomial: aPolynomial [
^aPolynomial timesNumber: self
]
Expand Down
46 changes: 0 additions & 46 deletions src/Math-Quaternion/PMQuaternion.extension.st

This file was deleted.