⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classfix.html

📁 Tixys source code, include G.711, G.726, IMA-ADPCM etc.
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Fix Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.1 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div><h1>Fix Class Reference<br><small>[<a class="el" href="group__fix.html">Maths - 32bit Fixed-Point Maths</a>]</small></h1><code>#include &lt;<a class="el" href="fix_8h-source.html">fix.h</a>&gt;</code><p><a href="classFix-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>Fixed point arithmatic functions. <p>Operands are 32 bits in size with the binary point between bits 15 and 16. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fix.html#ga0">fix</a> <a class="el" href="group__fix.html#ga1">ufix</a> <a class="el" href="group__fix.html#ga2">fixangle</a></dd></dl><dl compact><dt><b>Version:</b></dt><dd>2005-02-26<ul><li>Added <a class="el" href="classFix.html#e14">Random(uint32&amp; seed)</a></li><li>Added <a class="el" href="classFix.html#e15">Random(uint32&amp; seed,ufix range)</a> </li></ul></dd></dl><p><p>Definition at line <a class="el" href="fix_8h-source.html#l00070">70</a> of file <a class="el" href="fix_8h-source.html">fix.h</a>.<table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e0">Add</a> (<a class="el" href="group__fix.html#ga0">fix</a> a, <a class="el" href="group__fix.html#ga0">fix</a> b)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e1">Sub</a> (<a class="el" href="group__fix.html#ga0">fix</a> a, <a class="el" href="group__fix.html#ga0">fix</a> b)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e2">Mul</a> (<a class="el" href="group__fix.html#ga0">fix</a> a, <a class="el" href="group__fix.html#ga0">fix</a> b)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e3">MulNS</a> (<a class="el" href="group__fix.html#ga0">fix</a> a, <a class="el" href="group__fix.html#ga0">fix</a> b)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e4">Div</a> (<a class="el" href="group__fix.html#ga0">fix</a> a, <a class="el" href="group__fix.html#ga0">fix</a> b)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e5">Sqrt</a> (<a class="el" href="group__fix.html#ga1">ufix</a> a)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e6">Log2</a> (<a class="el" href="group__fix.html#ga1">ufix</a> a)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga1">ufix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e7">Exp2</a> (<a class="el" href="group__fix.html#ga0">fix</a> a)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e8">Sin</a> (<a class="el" href="group__fix.html#ga2">fixangle</a> angle)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e9">Cos</a> (<a class="el" href="group__fix.html#ga2">fixangle</a> angle)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e10">Tan</a> (<a class="el" href="group__fix.html#ga2">fixangle</a> angle)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga2">fixangle</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e11">ASin</a> (<a class="el" href="group__fix.html#ga0">fix</a> value)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga2">fixangle</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e12">ACos</a> (<a class="el" href="group__fix.html#ga0">fix</a> value)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga2">fixangle</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e13">ATan</a> (<a class="el" href="group__fix.html#ga0">fix</a> value)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e14">Random</a> (<a class="el" href="group__integers.html#ga2">uint32</a> &amp;seed)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static IMPORT <a class="el" href="group__fix.html#ga1">ufix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFix.html#e15">Random</a> (<a class="el" href="group__integers.html#ga2">uint32</a> &amp;seed, <a class="el" href="group__fix.html#ga1">ufix</a> range)</td></tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="e0" doxytag="Fix::Add"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">EXPORT <a class="el" href="group__fix.html#ga0">fix</a> Fix::Add           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td>          <td class="mdname" nowrap> <em>a</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td>          <td class="mdname" nowrap> <em>b</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Add two fixed-point numbers. Produces saturated result on overflow.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>a</em>&nbsp;</td><td>Augend </td></tr>    <tr><td valign="top"></td><td valign="top"><em>b</em>&nbsp;</td><td>Addend</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>a+b. <br> If a+b&gt;0x7FFF.FFFF then 0x7FFF.FFFF is returned. <br> If a+b&lt;-0x8000.0000 then -0x8000.0000 is returned.</dd></dl><p>Definition at line <a class="el" href="fix_8cpp-source.html#l00059">59</a> of file <a class="el" href="fix_8cpp-source.html">fix.cpp</a>.    </td>  </tr></table><a class="anchor" name="e1" doxytag="Fix::Sub"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">EXPORT <a class="el" href="group__fix.html#ga0">fix</a> Fix::Sub           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td>          <td class="mdname" nowrap> <em>a</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td>          <td class="mdname" nowrap> <em>b</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Subtract two fixed-point numbers. Produces saturated result on overflow.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>a</em>&nbsp;</td><td>Minuend </td></tr>    <tr><td valign="top"></td><td valign="top"><em>b</em>&nbsp;</td><td>Subtrahend</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>a-b. <br> If a-b&gt;0x7FFF.FFFF then 0x7FFF.FFFF is returned. <br> If a-b&lt;-0x8000.0000 then -0x8000.0000 is returned.</dd></dl><p>Definition at line <a class="el" href="fix_8cpp-source.html#l00068">68</a> of file <a class="el" href="fix_8cpp-source.html">fix.cpp</a>.    </td>  </tr></table><a class="anchor" name="e2" doxytag="Fix::Mul"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">EXPORT <a class="el" href="group__fix.html#ga0">fix</a> Fix::Mul           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td>          <td class="mdname" nowrap> <em>a</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td>          <td class="mdname" nowrap> <em>b</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Multiply two fixed-point numbers. Produces saturated result on overflow.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>a</em>&nbsp;</td><td>Multiplicand </td></tr>    <tr><td valign="top"></td><td valign="top"><em>b</em>&nbsp;</td><td>Multiplier</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>a*b. <br> If a*b&gt;0x7FFF.FFFF then 0x7FFF.FFFF is returned. <br> If a*b&lt;-0x8000.0000 then -0x8000.0000 is returned.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classFix.html#e3">MulNS()</a></dd></dl><p>Definition at line <a class="el" href="fix_8cpp-source.html#l00077">77</a> of file <a class="el" href="fix_8cpp-source.html">fix.cpp</a>.    </td>  </tr></table><a class="anchor" name="e3" doxytag="Fix::MulNS"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">EXPORT <a class="el" href="group__fix.html#ga0">fix</a> Fix::MulNS           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td>          <td class="mdname" nowrap> <em>a</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="group__fix.html#ga0">fix</a>&nbsp;</td>          <td class="mdname" nowrap> <em>b</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Multiply two fixed-point numbers. This is a Non-Saturating (and faster) version of <a class="el" href="classFix.html#e2">Mul()</a>. On overflow the result is undefined.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>a</em>&nbsp;</td><td>Multiplicand </td></tr>    <tr><td valign="top"></td><td valign="top"><em>b</em>&nbsp;</td><td>Multiplier</td></tr>  </table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -