Returns the vector dot product of two vectors .
dotProduct ( v1 As Vector, v2 As Vector ) As Number
Argument | Type | Description |
---|---|---|
v1 | Vector | The first vector . |
v2 | Vector | The second vector . |
Intent >dotProduct(vector(1.0, 0.0, 0.0), vector(1.0, 0.0, 0.0)) --> 1.0
Intent >dotProduct(vector(1.0, 0.0, 0.0), vector(0.0, 1.0, 0.0)) --> 0.0
Intent >dotProduct(vector(1.0, 1.0, 0.0), vector(1.0, 1.0, 0.0)) --> 2.0
Intent >dotProduct(vector(0.0, 2.5, 0.0), vector(0.0, 2.5, 0.0)) --> 6.25
Intent >dotProduct(vector(2.0, 2.5, 0.0), vector(1.0, 2.5, 0.0)) --> 8.25
Intent >dotProduct(vector(2.0, 2.5, 1.0), vector(2.0, 2.5, 1.0)) --> 11.25