Go to: Synopsis. Return value. MEL examples.

Synopsis

float dotProduct( float $v1[], float $v2[], int $normalizeInputs )

Returns the dot product of two 3D float arrays. If $normalizeInputs is set then the vectors are normalized before the dot product is calculated.

Return value

None

Arguments

Variable Name Variable Type Description
$v1float[]First vector
$v2float[]Second vector
$normalizeInputsint1 means normalize $v1, $v2 before calculation

MEL examples

	float $v1[3] = {1,2,3};
	float $v2[3] = {4,5,6};
	dotProduct($v1, $v2, 0);
	// Results: 32 //