vector.dot
EditReturns the dot product of two vectors.
dot = vector.dot(a, b)Arguments
| Name | Type | Description |
| a | vector | The first vector. |
| b | vector | The second vector. |
Returns
| Name | Type | Description |
| dot | number | The dot product of the two vectors. |
Notes
This is computed as a.x * b.x + a.y * b.y + a.z * b.z.
Example
vector.dot(vector(1, 2, 3), vector(3, 2, 1)) --> 10