neg (Vector)
Returns a vector's reverse.
Arguments
vector0
is the initial
Vector.
Return values
vector1
is the reversed
Vector.
Complexity
O(dimension)
Example
"sl/algebra" useFile
v1: (1.0 3.0 2.0) makeVector;
v1 neg .makeRange [print "," print] each
Output:
-1.000000,-3.000000,-2.000000,