Vector Arithmetics - 0.7a
by admin on Feb.01, 2010, under Smalltalk
A new version has been published with new version of primitives - therefore you need both: the Smalltalk code and the new library.
With this version you have base arithmetics (+, -, *, /) and some mixture between scalar/vector and vector/vector operands.
Therefore you may now have code like:
| first second result | first := #(1 2 3) asMSKOSFloat64Vector. second := 2.0 . result := first + second. self assert: (result first = 3.0). self assert: (result second = 4.0). self assert: (result third = 5.0) .
or
| first second | first := #(1 2 3) asMSKOSFloat64Vector. second := 2.0 . first += second. self assert: (first first = 3.0). self assert: (first second = 4.0). self assert: (first third = 5.0) .