Vector functions in scripts

Vectors can be defined in scripts by putting the components in square brackets: A = [1,2,3];. The following vector functions have been defined.

The function dot(A,B) is overloaded. If the arguments A and B are vectors, it returns the scalar vector product of these vectors but if the arguments are a vector and a scalar, it returns the vector muliplied by the scalar. The vector functions report intermediate results to the Script Output. You can load example scripts with the buttons at the bottom.

Script Output