#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
a |
Pointer to first Vec for cross product calculation. |
|
Pointer to second Vec for cross product calculation. |
axb |
Pointer to resultant Vec ( a x b ). Acceptable if axb = a or axb = b. |
None.
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.
03/01/2006 Initial version.