

#include <nitro/fx/fx_vec.h>
SDK_WEAK_SYMBOL
void VEC_Normalize(const VecFx32 * pSrc, VecFx32 * pDst);
| pSrc | Pointer to a vector. |
| pDst | Pointer to the normalized vector. |
None.
Normalizes VecFx32-type vectors. The result is stored in *pDst.
The pointers *pSrc and *pDst can be pointers to the same vector.
The function uses the divider and square-root calculator. See Divider Usage Notes when using this function inside an interrupt.
The error in the obtained result becomes large when the vector specified by pSrc is extremely short. This function is provided as a weak symbol, so you can overwrite it by defining an independent function with the same name.
Note: Correct calculation results cannot be obtained when (pSrc.x×pSrc.x)+(pSrc.y×pSrc.y)+(pSrc.z×pSrc.z) > 0x100000000000000.
2009/09/08 Added a note stating that this function is a weak symbol.
2006/04/27 Added notes.
2004/01/19 Initial version.
CONFIDENTIAL