#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 the first Vec. a is not altered by this function. |
|---|---|
| b | Pointer to the second Vec. b is not altered by this function. |
Returns the 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. 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 each of C_VECDotProduct/PSVECDotProduct explicitly.
2006/03/01 Initial version.
CONFIDENTIAL