VECSubtract

C Specification

#include <revolution/mtx.h>
void C_VECSubtract ( const Vec* a, const Vec* b, Vec* a_b );
void PSVECSubtract ( const Vec* a, const Vec* b, Vec* a_b );

#define VECSubtract  C_VECSubtract // for debug build
#define VECSubtract  PSVECSubtract // for nondebug build

Arguments

a Pointer to first Vec for subtraction.
b   Pointer to second Vec; this vector is subtracted from the first.
a_b Pointer to resultant Vec of ( a - b ) subtraction. Acceptable if a_b = a or a_b = b.

Return Values

None.

Description

This function subtracts vector b from vector a ( a - b ) and places the result in a_b. This is equivalent to calling VECAdd after first negating b.

During a debug build, VECSubtract is interpreted as C_VECSubtract, which is a normal C language version. During a non-debug build for a Broadway processor, the paired-singles equivalent of this function, PSVECSubtract, will be automatically substituted. You can also call C_VECSubtract or PSVECSubtract explicitly.

See Also

Vec, VecPtr, VECAdd

Revision History

03/01/2006 Initial version.