1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>VEC_Normalize</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">VEC_Normalize <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1> 15<H2>Syntax</H2> 16 17<dl> 18 <dd> 19<PRE><CODE>#include <nitro/fx/fx_vec.h> 20 21void VEC_Normalize(const VecFx32 * pSrc, VecFx32 * pDst);</CODE></PRE> 22 </dd> 23</dl><h2>Arguments</h2> 24 25<table border="1" width="100%"> 26 27 28 29 <TR> 30<TD width="176"><CODE>pSrc</CODE></TD> 31<TD width="670">Pointer to a vector.</TD> 32 </TR> 33 <TR> 34<TD><CODE>pDst</CODE></TD> 35<TD>Pointer to the normalized vector.</TD> 36 </TR> 37 </table> 38<h2>Return Values</h2> 39<p>None.</p> 40<H2>Description</H2> 41<P>Normalizes <A href="VecFx32.html"><CODE>VecFx32</CODE></A>-type vectors. The result is stored in *<CODE>pDst</CODE>.<BR><CODE>*pSrc</CODE> and <CODE>*pDst</CODE> can be pointers to the same vector.<BR>The function uses the divider and square root calculator. See <A href="../../cp/div/about_div.html#use_in_intr">Divider Usage Notes</A> when using this function inside an interrupt.</P> 42 43<P><B>Note:</B> Correct calculation results cannot be obtained when <CODE>(pSrc.x×pSrc.x)+(pSrc.y×pSrc.y)+(pSrc.z×pSrc.z) > 0x100000000000000</CODE>.</P> 44 45<h2>See Also</h2> 46<H2>Revision History</H2> 47<P>2006/04/27 Added a note.<BR> 2004/01/19 Initial version.</P> 48<hr><p>CONFIDENTIAL</p></body> 49</html> 50