VECDistance

Syntax

    #include <revolution/mtx.h>

f32 C_VECDistance ( const Vec* a, const Vec* b );
f32 PSVECDistance ( const Vec* a, const Vec* b );

#define VECDistance  C_VECDistance // for debug build
#define VECDistance  PSVECDistance // for nondebug build

Arguments

a Pointer to the first vector Vec for distance calculation
b   Pointer to the second vector Vec for distance calculation

Return Values

Returns the distance between the two vectors.

Description

Returns the distance between vectors a and b (the distance between two points, a and b, expressed as a vector).

During a debug build, VECDistance is parsed as C_VECDistance, which exists in a standard C language version. During a non-debug build using a Broadway processor, the paired singles equivalent to this function, PSVECDistance, is automatically substituted. You can also call C_VECDistance and PSVECDistance explicitly.

See Also

Vec, VecPtr, VECSquareDistance

Revision History

2006/03/01 Initial version.


CONFIDENTIAL