Skip to content
Chung Leong edited this page Jan 10, 2022 · 4 revisions

dot - Dot product

float dot( float[] $x, float[] $y )

dot() computes the dot product of x and y.

Parameters:

x - The first vector. It can be a one-dimensional array or a multi-dimensional array.

y - The second vector. It can be a one-dimensional array or a multi-dimensional array. The lowest dimensional--i.e. the vector width--should match that of x.

Return Value:

The dot product of x and y. If either x or y is a multi-dimensional array, the return value will be an array whose size is the number of vectors in the larger of x and y.

Version

1.0 and above.

Clone this wiki locally