VECCrossProduct

C Specification

#include <revolution/mtx.h>
void C_VECCrossProduct ( const Vec* a, const Vec* b, Vec* axb );
void PSVECCrossProduct ( const Vec* a, const Vec* b, Vec* axb );

#define VECCrossProduct  C_VECCrossProduct // for debug build
#define VECCrossProduct  PSVECCrossProduct // for nondebug build

Arguments

a Pointer to first Vec for cross product calculation.
b   Pointer to second Vec for cross product calculation.
axb Pointer to resultant Vec ( a x b ). Acceptable if axb = a or axb = b.

Return Values

None.

Description

Computes the cross product of two vectors ( a x b ) and places the result in axb. When using this function, note that the order in which vectors are passed as arguments determines the orientation of the orthogonal vector: ( v1 x v2 ) = -( v2 x v1 ).

During a debug build, VECCrossProduct is interpreted as C_VECCrossProduct, which is a normal C language version. During a non-debug build for a Broadway processor, the paired-singles equivalent of this function, PSVECCrossProduct, will be automatically substituted. You can also call C_VECCrossProduct or PSVECCrossProduct explicitly.

See Also

Vec, VecPtr,

VECDotProduct

Revision History

03/01/2006 Initial version.