Go to: Synopsis. Return value. MEL examples.

Synopsis

float[] crossProduct( float $v1[], float $v2[],
int $normalizeInputs, int $normalizeResult )

Given two float arrays of 3 values each, this procedure returns the cross product of the two arrays as a float array of size 3.

Return value

None

Arguments

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

MEL examples

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