#include <revolution/mtx.h> f32 C_VECSquareDistance ( const Vec* a, const Vec* b ); f32 PSVECSquareDistance ( const Vec* a, const Vec* b ); #define VECSquareDistance C_VECSquareDistance // for debug build #define VECSquareDistance PSVECSquareDistance // for nondebug build
a |
Pointer to the first vector (Vec) for squared distance calculation |
|---|---|
b |
Pointer to the second vector (Vec) for squared distance calculation |
Returns the square of the distance between vectors.
Returns the square of the distance between vectors a and b (the distance between two points, a and b, expressed as a vector). Distance can be calculated using the square root of the returned value.
During a debug build, VECSquareDistance is parsed as C_VECSquareDistance, which is a normal C language version. During a non-debug build for a Broadway processor, the paired-singles equivalent of this function, PSVECSquareDistance, will be automatically substituted. You can also call C_VECSquareDistance and PSVECSquareDistance explicitly.
2006/03/01 Initial version.
CONFIDENTIAL