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 7.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>FX_SinIdx</title>
9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">FX_SinIdx <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 &lt;nitro/fx/fx_trig.h&gt;
20
21fx16 FX_SinIdx(int idx);</CODE></PRE>
22  </dd>
23</dl><h2>Arguments</h2>
24
25<table border="1" width="100%">
26
27
28    <TR>
29      <TD width="176"><em><strong><font face="Courier New">idx</font></strong></em></TD>
30      <TD width="670">The number of units with a value of 2&pi; radians divided by 65536.</TD>
31    </TR>
32  </table>
33<h2>Return Values</h2>
34<p>Approximation of the sine.</p>
35<H2>Description</H2>
36<P>The argument equates 1 to the value of 2&pi; radian divided by 65,536. It returns the result as an <CODE><A href="fx16.html">fx16</A></CODE> type. It is based on a lookup in an internal 4,096-element table. Be aware that the error will become very large near  0 and &pi;. The argument must take a value between 0 and 65535.</P>
37<P>The argument is the <EM><STRONG><CODE>int</CODE></STRONG></EM> type, so in order to make the negative numbers and the numbers larger than 65536 to wrap around to be between 0 and 65536, it needs to be cast explicitly to an <CODE>u16</CODE> type or masked by 0xffff.</P>
38
39<h2>See Also</h2>
40<P><code><A href="FX_CosIdx.html">FX_CosIdx</A>, <A href="FX_SinFx64c.html">FX_SinFx64c</A>, <A href="FX_CosFx64c.html">FX_CosFx64c</A></code></P>
41<H2>Revision History</H2>
42<P>2004/06/16 Initial version.</P>
43<hr><p>CONFIDENTIAL</p></body>
44</html>
45