nd Q31 have a scaled input with the range [0 +0.9999] mapping to [0 2*pi). The fixed-point range is chosen so that a value of 2*pi wraps around to 0.</p>
<p>The implementation is based on table lookup using 256 values together with linear interpolation. The steps used are:</p>
<ol type="1">
<li>Calculation of the nearest integer table index</li>
<li>Compute the fractional portion (fract) of the table index.</li>
<li>The final result equals <code>(1.0f-fract)*a + fract*b;</code></li>
</ol>
<p>where </p>
<pre