+ (Vector)

Returns the sum of two vectors with the same dimension.

Arguments

vector0
and
vector1
are the Vectors to add. If their dimensions are different, an error will occur.

Return values

vector2
is the sum Vector.

Complexity

O(dimension)

Example

"sl/algebra" useFile v1: (1.0 3.0 2.0) makeVector; v2: (0.1 0.2 0.3) makeVector; v1 v2 + .makeRange [print "," print] each
Output:
1.100000,3.200000,2.300000,