Skip to content
Chris Petersen edited this page Oct 16, 2014 · 2 revisions

#(vector-scale vec n) vector-scale scales a vector by a value.

Parameter Description
vec Input vector
n Scaling factor

Example

Example 1: Show a few vector operations

> (vector-sum (vector 1 2 3 4 5 6 7 8 9))
45
> (vector-product (vector 1 2 3 4 5))        
120
> (vector-scale (vector 1 2 3 4 5) 10)
#(10 20 30 40 50)
> (vector-offset (vector 1 2 3 4 5) 10)
#(11 12 13 14 15)
> (vector-mean (vector 1 2 3 4 5 6 7))
4
Clone this wiki locally