Skip to content

Dot Product

The Dot Product block returns the sum of the element-wise products of its inputs.

y = dot(a, b)

Port Direction Type
0, 1 Input The same numeric array, [f64; 3] by default
0 Output The arrays’ element type, f64 by default

The block follows the type wired into it, so two [f32; 3] inputs give an f32.

None.

For a = [1.0, 2.0, 3.0] and b = [4.0, 5.0, 6.0], the output is y = 32.0.