We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef3d850 commit 3118bfaCopy full SHA for 3118bfa
src/Math-Core/Number.extension.st
@@ -11,3 +11,9 @@ Number >> addWithVector: aVector [
11
"Adds itself to each element of the vector"
12
^ aVector collect: [ :each | each + self ]
13
]
14
+
15
+{ #category : #'*Math-Core' }
16
+Number >> productWithVector: aVector [
17
+ "Answers a new vector product of the receiver with aVector."
18
+ ^aVector collect: [ :each | each * self]
19
+]
src/Math-Matrix/Number.extension.st
@@ -0,0 +1,6 @@
1
+Extension { #name : #Number }
2
3
+{ #category : #'*Math-Matrix' }
4
+Number >> productWithMatrix: aMatrix [
5
+^aMatrix class rows: (aMatrix rowsCollect: [:r| self productWithVector: r])
6
0 commit comments