Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcombriat committed Feb 22, 2024
1 parent bac1519 commit 5a78b44
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 17 deletions.
12 changes: 6 additions & 6 deletions docs/html/FixMath_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@
<tr class="memitem:aaaaa1dc404829e0ec37bc565d58f394f"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:aaaaa1dc404829e0ec37bc565d58f394f"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classUFix.html">UFix</a>&lt; 0, sizeof(T) *8 &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="FixMath_8h.html#aaaaa1dc404829e0ec37bc565d58f394f">toUFraction</a> (T val)</td></tr>
<tr class="separator:aaaaa1dc404829e0ec37bc565d58f394f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5160f5ab224e5424f6dd9e608db0dc9d"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a5160f5ab224e5424f6dd9e608db0dc9d"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classUFix.html">UFix</a>&lt; sizeof(T) *8-1, 0 &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="FixMath_8h.html#a5160f5ab224e5424f6dd9e608db0dc9d">toUInt</a> (T val)</td></tr>
<tr class="separator:a5160f5ab224e5424f6dd9e608db0dc9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2666bae0f50341fb0db86af1af47ec9"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:aa2666bae0f50341fb0db86af1af47ec9"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classUFix.html">UFix</a>&lt; sizeof(T) *8, 0 &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="FixMath_8h.html#aa2666bae0f50341fb0db86af1af47ec9">toUInt</a> (T val)</td></tr>
<tr class="separator:aa2666bae0f50341fb0db86af1af47ec9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83bdc57433394da979b73216f504a531"><td class="memTemplParams" colspan="2">template&lt;int8_t NI, int8_t NF, uint64_t RANGE, int8_t _NI, int8_t _NF, uint64_t _RANGE&gt; </td></tr>
<tr class="memitem:a83bdc57433394da979b73216f504a531"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classSFix.html">SFix</a>&lt; FixMathPrivate::neededSNIExtra(FixMathPrivate::FM_max(NI, _NI), FixMathPrivate::FM_max(NF, _NF), FixMathPrivate::rangeAdd(NF, _NF, RANGE, _RANGE)), FixMathPrivate::FM_max(NF, _NF), FixMathPrivate::rangeAdd(NF, _NF, RANGE, _RANGE)&gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="FixMath_8h.html#a83bdc57433394da979b73216f504a531">operator+</a> (const <a class="el" href="classSFix.html">SFix</a>&lt; NI, NF, RANGE &gt; &amp;op1, const <a class="el" href="classUFix.html">UFix</a>&lt; _NI, _NF, _RANGE &gt; &amp;op2)</td></tr>
<tr class="separator:a83bdc57433394da979b73216f504a531"><td class="memSeparator" colspan="2">&#160;</td></tr>
Expand Down Expand Up @@ -890,8 +890,8 @@ <h2 class="memtitle"><span class="permalink"><a href="#aaaaa1dc404829e0ec37bc565

</div>
</div>
<a id="a5160f5ab224e5424f6dd9e608db0dc9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5160f5ab224e5424f6dd9e608db0dc9d">&#9670;&nbsp;</a></span>toUInt()</h2>
<a id="aa2666bae0f50341fb0db86af1af47ec9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa2666bae0f50341fb0db86af1af47ec9">&#9670;&nbsp;</a></span>toUInt()</h2>

<div class="memitem">
<div class="memproto">
Expand All @@ -902,7 +902,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a5160f5ab224e5424f6dd9e60
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classUFix.html">UFix</a>&lt;sizeof(T)*8-1,0&gt; toUInt </td>
<td class="memname"><a class="el" href="classUFix.html">UFix</a>&lt;sizeof(T)*8,0&gt; toUInt </td>
<td>(</td>
<td class="paramtype">T&#160;</td>
<td class="paramname"><em>val</em></td><td>)</td>
Expand Down
4 changes: 2 additions & 2 deletions docs/html/FixMath_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@
<div class="line"><a name="l00639"></a><span class="lineno"> 639</span>&#160;<span class="stringliteral">}</span></div>
<div class="line"><a name="l00640"></a><span class="lineno"> 640</span>&#160;<span class="stringliteral"></span> </div>
<div class="line"><a name="l00651"></a><span class="lineno"> 651</span>&#160;<span class="stringliteral">template&lt;typename T&gt;</span></div>
<div class="line"><a name="l00652"></a><span class="lineno"><a class="line" href="FixMath_8h.html#a5160f5ab224e5424f6dd9e608db0dc9d"> 652</a></span>&#160;<span class="stringliteral">inline UFix&lt;sizeof(T)*8-1,0&gt; toUInt(T val) {</span></div>
<div class="line"><a name="l00653"></a><span class="lineno"> 653</span>&#160;<span class="stringliteral"> return UFix&lt;sizeof(T)*8-1,0&gt;::fromRaw(val); </span></div>
<div class="line"><a name="l00652"></a><span class="lineno"><a class="line" href="FixMath_8h.html#aa2666bae0f50341fb0db86af1af47ec9"> 652</a></span>&#160;<span class="stringliteral">inline UFix&lt;sizeof(T)*8,0&gt; toUInt(T val) {</span></div>
<div class="line"><a name="l00653"></a><span class="lineno"> 653</span>&#160;<span class="stringliteral"> return UFix&lt;sizeof(T)*8,0&gt;::fromRaw(val); </span></div>
<div class="line"><a name="l00654"></a><span class="lineno"> 654</span>&#160;<span class="stringliteral">}</span></div>
<div class="line"><a name="l00655"></a><span class="lineno"> 655</span>&#160;<span class="stringliteral"></span> </div>
<div class="line"><a name="l00656"></a><span class="lineno"> 656</span>&#160;<span class="stringliteral"></span> </div>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/globals.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
: <a class="el" href="FixMath_8h.html#aaaaa1dc404829e0ec37bc565d58f394f">FixMath.h</a>
</li>
<li>toUInt()
: <a class="el" href="FixMath_8h.html#a5160f5ab224e5424f6dd9e608db0dc9d">FixMath.h</a>
: <a class="el" href="FixMath_8h.html#aa2666bae0f50341fb0db86af1af47ec9">FixMath.h</a>
</li>
</ul>
</div><!-- contents -->
Expand Down
2 changes: 1 addition & 1 deletion docs/html/globals_func.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
: <a class="el" href="FixMath_8h.html#aaaaa1dc404829e0ec37bc565d58f394f">FixMath.h</a>
</li>
<li>toUInt()
: <a class="el" href="FixMath_8h.html#a5160f5ab224e5424f6dd9e608db0dc9d">FixMath.h</a>
: <a class="el" href="FixMath_8h.html#aa2666bae0f50341fb0db86af1af47ec9">FixMath.h</a>
</li>
</ul>
</div><!-- contents -->
Expand Down
2 changes: 1 addition & 1 deletion docs/html/search/all_6.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ var searchData=
['tosfraction_30',['toSFraction',['../FixMath_8h.html#a46b90b067252e2ceeed03c96ccc55fd4',1,'FixMath.h']]],
['tosint_31',['toSInt',['../FixMath_8h.html#a83bd22fe181cddcf4c3faacbe86140fa',1,'FixMath.h']]],
['toufraction_32',['toUFraction',['../FixMath_8h.html#aaaaa1dc404829e0ec37bc565d58f394f',1,'FixMath.h']]],
['touint_33',['toUInt',['../FixMath_8h.html#a5160f5ab224e5424f6dd9e608db0dc9d',1,'FixMath.h']]]
['touint_33',['toUInt',['../FixMath_8h.html#aa2666bae0f50341fb0db86af1af47ec9',1,'FixMath.h']]]
];
2 changes: 1 addition & 1 deletion docs/html/search/functions_6.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ var searchData=
['tosfraction_67',['toSFraction',['../FixMath_8h.html#a46b90b067252e2ceeed03c96ccc55fd4',1,'FixMath.h']]],
['tosint_68',['toSInt',['../FixMath_8h.html#a83bd22fe181cddcf4c3faacbe86140fa',1,'FixMath.h']]],
['toufraction_69',['toUFraction',['../FixMath_8h.html#aaaaa1dc404829e0ec37bc565d58f394f',1,'FixMath.h']]],
['touint_70',['toUInt',['../FixMath_8h.html#a5160f5ab224e5424f6dd9e608db0dc9d',1,'FixMath.h']]]
['touint_70',['toUInt',['../FixMath_8h.html#aa2666bae0f50341fb0db86af1af47ec9',1,'FixMath.h']]]
];
9 changes: 4 additions & 5 deletions docs/latex/FixMath_8h.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
\label{FixMath_8h}\index{FixMath.h@{FixMath.h}}
{\ttfamily \#include $<$Arduino.\+h$>$}\newline
{\ttfamily \#include \char`\"{}Integer\+Type.\+h\char`\"{}}\newline
Include dependency graph for Fix\+Math.\+h\+:
\nopagebreak
Include dependency graph for Fix\+Math.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
Expand Down Expand Up @@ -60,7 +59,7 @@
\item
{\footnotesize template$<$typename T $>$ }\\\mbox{\hyperlink{classUFix}{UFix}}$<$ 0, sizeof(T) $\ast$8 $>$ \mbox{\hyperlink{FixMath_8h_aaaaa1dc404829e0ec37bc565d58f394f}{to\+UFraction}} (T val)
\item
{\footnotesize template$<$typename T $>$ }\\\mbox{\hyperlink{classUFix}{UFix}}$<$ sizeof(T) $\ast$8-\/1, 0 $>$ \mbox{\hyperlink{FixMath_8h_a5160f5ab224e5424f6dd9e608db0dc9d}{to\+UInt}} (T val)
{\footnotesize template$<$typename T $>$ }\\\mbox{\hyperlink{classUFix}{UFix}}$<$ sizeof(T) $\ast$8, 0 $>$ \mbox{\hyperlink{FixMath_8h_aa2666bae0f50341fb0db86af1af47ec9}{to\+UInt}} (T val)
\item
{\footnotesize template$<$int8\+\_\+t NI, int8\+\_\+t NF, uint64\+\_\+t RANGE, int8\+\_\+t \+\_\+\+NI, int8\+\_\+t \+\_\+\+NF, uint64\+\_\+t \+\_\+\+RANGE$>$ }\\\mbox{\hyperlink{classSFix}{SFix}}$<$ Fix\+Math\+Private\+::needed\+SNIExtra(Fix\+Math\+Private\+::\+FM\+\_\+max(NI, \+\_\+\+NI), Fix\+Math\+Private\+::\+FM\+\_\+max(NF, \+\_\+\+NF), Fix\+Math\+Private\+::range\+Add(NF, \+\_\+\+NF, RANGE, \+\_\+\+RANGE)), Fix\+Math\+Private\+::\+FM\+\_\+max(NF, \+\_\+\+NF), Fix\+Math\+Private\+::range\+Add(NF, \+\_\+\+NF, RANGE, \+\_\+\+RANGE)$>$ \mbox{\hyperlink{FixMath_8h_a83bdc57433394da979b73216f504a531}{operator+}} (const \mbox{\hyperlink{classSFix}{SFix}}$<$ NI, NF, RANGE $>$ \&op1, const \mbox{\hyperlink{classUFix}{UFix}}$<$ \+\_\+\+NI, \+\_\+\+NF, \+\_\+\+RANGE $>$ \&op2)
\item
Expand Down Expand Up @@ -428,12 +427,12 @@
\begin{DoxyReturn}{Returns}
A UFix$<$0,\+NF$>$ with NF chosen according to the input type
\end{DoxyReturn}
\mbox{\Hypertarget{FixMath_8h_a5160f5ab224e5424f6dd9e608db0dc9d}\label{FixMath_8h_a5160f5ab224e5424f6dd9e608db0dc9d}}
\mbox{\Hypertarget{FixMath_8h_aa2666bae0f50341fb0db86af1af47ec9}\label{FixMath_8h_aa2666bae0f50341fb0db86af1af47ec9}}
\index{FixMath.h@{FixMath.h}!toUInt@{toUInt}}
\index{toUInt@{toUInt}!FixMath.h@{FixMath.h}}
\doxysubsubsection{\texorpdfstring{toUInt()}{toUInt()}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
\mbox{\hyperlink{classUFix}{UFix}}$<$sizeof(T)$\ast$8-\/1,0$>$ to\+UInt (\begin{DoxyParamCaption}\item[{T}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}
\mbox{\hyperlink{classUFix}{UFix}}$<$sizeof(T)$\ast$8,0$>$ to\+UInt (\begin{DoxyParamCaption}\item[{T}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Create a {\itshape pure} integer unsigned fixed number (\mbox{\hyperlink{classUFix}{UFix}}) from an unsigned integer. The number of fractional bits (NI) is chosen automatically depending on the input type. Hence to\+UInt(255) and to\+UInt(uint8\+\_\+t(255)) {\itshape do not} lead to the same thing\+: on an AVR, the former will lead to NI=16 -\/ which is overkill -\/ whereas the latter will lead to NI=8. Mozzi\textquotesingle{}s objects (Oscil and the like) returns correct types, hence you can use this function to convert the return value of a Mozzi\textquotesingle{}s function/class member into a pure fractional number.
\begin{DoxyParams}{Parameters}
Expand Down

0 comments on commit 5a78b44

Please sign in to comment.