VECSquareDistance

C Specification

#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

Arguments

a Pointer to first Vec for squared distance calculation.
b   Pointer to second Vec for squared distance calculation.

Return Values

The square of the distance between the vectors.

Description

Returns the square of the distance between vectors a and b. Distance can be calculated using the square root of the returned value.

During a debug build, VECSquareDistance is interpreted 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 each of C_VECSquareDistance/PSVECSquareDistance explicitly.

See Also

Vec, VecPtr, VECDistance

Revision History

03/01/2006 Initial version.