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>VECCrossProduct</TITLE> 9</HEAD> 10<BODY> 11<H1>VECCrossProduct</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/mtx.h> 16 17void C_VECCrossProduct ( const Vec* a, const Vec* b, Vec* axb ); 18void PSVECCrossProduct ( const Vec* a, const Vec* b, Vec* axb ); 19 20#define VECCrossProduct C_VECCrossProduct // for debug build 21#define VECCrossProduct PSVECCrossProduct // for nondebug build 22</pre></dd></dl> 23 24<H2>Arguments</H2> 25<TABLE class="arguments" border="1" > 26 <TBODY> 27 <TR> 28<TH>a</TH> 29<TD>Pointer to the first <A href="../structures/Vec_VecPtr.html"><CODE>Vec</CODE></A> for cross-product calculation.</TD> 30 </TR> 31 <TR> 32<TH>b</TH> 33<TD>Pointer to the second <CODE><A href="../structures/Vec_VecPtr.html">Vec</A></CODE> for cross-product calculation.</TD> 34 </TR> 35 <TR> 36<TH>axb</TH> 37<TD>Pointer to the resultant <a href="../Structures/Vec_VecPtr.html">Vec</a> ( <code><em><strong>a</strong></em> x <em><strong>b</strong></em></code> ). Okay if <SPAN class="argument">axb</SPAN> = <SPAN class="argument">a</SPAN> or <SPAN class="argument">axb</SPAN> = <SPAN class="argument">b</SPAN>.</TD> 38 </TR> 39 </TBODY> 40</TABLE> 41 42<H2>Return Values</H2> 43<P>None.</P> 44 45<H2>Description</H2> 46<P>Computes the cross-product of two vectors ( <code><em><strong>a</strong></em> x <em><strong>b</strong></em></code> ) and places the result in <code><em><strong>axb</strong></em></code>. When using this function, note that the order in which vectors are passed as arguments determines the orientation of the orthogonal vector: ( v1 x v2 ) = -( v2 x v1 ).</P> 47<P>During a debug build, <code>VECCrossProduct</code> is interpreted as <code>C_VECCrossProduct</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><font face="Courier New">PSVECCrossProduct</font></code>, will be automatically substituted. You can also call each of <code>C_VECCrossProduct/PSVECCrossProduct</code> explicitly.</P> 48 49<H2>See Also</H2> 50<P class="reference"> 51<A href="../structures/Vec_VecPtr.html">Vec, VecPtr</A>, 52<A href="VECDotProduct.html">VECDotProduct</A> 53</P> 54 55<H2>Revision History</H2> 56<P> 572006/03/01 Initial version. 58</P> 59 60<hr><p>CONFIDENTIAL</p></body> 61</HTML>