MSK Software Development

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)		.
:, ,

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...