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

vector-dot returns the dot product (inner product) of two vectors

Parameter Description
v1 First vector
v2 Second vector

Example

Example 1: Calculate the dot product of two vectors, and show equivalent list form.

> (vector-dot (vector 1 2 3 4) (vector 1 2 3 4))
30
> (list-dot (list 1 2 3 4) (list 1 2 3 4))
30
Clone this wiki locally