#include <revolution/mtx.h>
f32 C_VECDotProduct ( const Vec* a, const Vec* b );
f32 PSVECDotProduct ( const Vec* a, const Vec* b );
#define VECDotProduct C_VECDotProduct // for debug build
#define VECDotProduct PSVECDotProduct // for nondebug build
a |
Pointer to first Vec. a is not altered by this function. |
|
Pointer to second Vec. b is not altered by this function. |
Dot product of a and b.
Finds the inner product of two vectors. a and b do not need to be unit vectors and are not normalized inside this function. In order to use VECDotProduct to calculate the cosine directly, a and b must be normalized before calling this routine.
During a debug build, VECDotProduct is interpreted as C_VECDotProduct, which is a normal C language version. During a non-debug build for a Broadway processor, the paired-singles equivalent of this function, PSVECDotProduct, will be automatically substituted. You can also call C_VECDotProduct or PSVECDotProduct explicitly.
2006/03/01 Initial version.
CONFIDENTIAL