1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="Microsoft FrontPage 5.0">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<TITLE>VECMag</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">VECMag</H1>
12<H2 align="left">C Specification</H2>
13<BLOCKQUOTE><CODE><CODE>#include &lt;revolution/mtx.h&gt;</CODE></CODE></BLOCKQUOTE>
14<BLOCKQUOTE><CODE><CODE>f32 C_VECMag ( const Vec* <EM>v</EM> );<BR> f32 PSVECMag ( const Vec* <EM>v</EM> );<BR> <BR> #define VECMag&nbsp; C_VECMag // for debug build<BR> #define VECMag&nbsp; PSVECMag // for nondebug build</CODE></CODE></BLOCKQUOTE>
15<H2 align="left">Arguments</H2>
16<DIV align="left">
17<TABLE border="1" cellpadding="3" cellspacing="0.1">
18  <TBODY>
19    <TR>
20<TD width="120" bgcolor="#ffffe8"><CODE><EM><STRONG>v</STRONG></EM> </CODE></TD>
21<TD width="520" valign="top" align="left">Pointer to <A href="../structures/Vec_VecPtr.html"><CODE>Vec</CODE></A> for magnitude computation.</TD>
22    </TR>
23  </TBODY>
24</TABLE>
25</DIV>
26<H2 align="left">Return Values</H2>
27<P align="left">Returns the magnitude of the vector <code><em><strong>v</strong></em></code>.</P>
28<H2 align="left">Description</H2>
29<P>This function computes the magnitude of a vector.</P>
30<P>During a debug build, <code>VECMag</code> is interpreted as <code>C_VECMag</code>, which is a normal C language version. During a non-debug build for a Broadway processor, the paired-singles equivalent of this function, <code>PSVECMag</code>, will be automatically substituted. You can also call <code>C_VECMag</CODE> or <CODE>PSVECMag</code> explicitly.</P>
31
32
33<H2 align="left">See Also</H2>
34<P align="left"><A href="../structures/Vec_VecPtr.html"><CODE>Vec, VecPtr, </CODE></A><CODE><A href="VECNormalize.html">VECNormalize</A>, <A href="VECSquareMag.html">VECSquareMag</A></CODE></P>
35<H2>Revision History</H2>
36<P>03/01/2006 Initial version.</P>
37</BODY>
38</HTML>