- (Vector)

Returns the difference of two vectors with the same dimension. If the dimensions are different, an error will occur.

Arguments

vector0
is the Vector to subtract from.
vector1
is the Vector to subtract.
They must have the same dimension, otherwise, an error will occur.

Return values

vector2
is the subtraction result 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:
0.900000,2.800000,1.700000,