Go to: Synopsis. Return value. MEL examples.
float dotProduct( float $v1[], float $v2[], int $normalizeInputs )
None
Variable Name | Variable Type | Description |
---|---|---|
$v1 | float[] | First vector |
$v2 | float[] | Second vector |
$normalizeInputs | int | 1 means normalize $v1, $v2 before calculation |
float $v1[3] = {1,2,3}; float $v2[3] = {4,5,6}; dotProduct($v1, $v2, 0); // Results: 32 //