vectorA:dot
From ComputerCraft Wiki
| Returns the dot product of two vectors. | |
| Syntax | vector:dot(vector vect) |
| Returns | vector |
| Part of | ComputerCraft |
| API | vector |
Examples
| Creates a dot product of two vectors and prints the resulting vector. | |
| Code |
local a = vector.new(1, 2, 3) local b = vector.new(4, 5, 6) local c = a:dot(b) print(c) --32 |
In the case of dot products, a:dot(b) will equal b:dot(a).
More information about dot products can be found at [1]