mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-23 04:25:51 +00:00
deploy: afc05659ed
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>rippled: MathUtilities.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -29,7 +29,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
@@ -46,6 +46,11 @@ $(function() {
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function() { init_codefold(0); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
@@ -105,11 +110,13 @@ $(function() {
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="keyword">constexpr</span> <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a></div>
|
||||
<div class="foldopen" id="foldopen00044" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="namespaceripple.html#a80033fe071280d537dbd79e19ba5b628"> 44</a></span><a class="code hl_function" href="namespaceripple.html#a80033fe071280d537dbd79e19ba5b628">calculatePercent</a>(<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> count, <a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a> total)</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span>{</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> assert(total != 0); <span class="comment">// NOTE No XRPL_ASSERT here, because constexpr</span></div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">return</span> ((<a class="code hl_functionRef" href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a>(count, total) * 100) + total - 1) / total;</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="comment">// unit tests</span></div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="keyword">static_assert</span>(<a class="code hl_function" href="namespaceripple.html#a80033fe071280d537dbd79e19ba5b628">calculatePercent</a>(1, 2) == 50);</div>
|
||||
@@ -134,13 +141,13 @@ $(function() {
|
||||
<div class="ttc" id="acassert_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/cassert.html">cassert</a></div></div>
|
||||
<div class="ttc" id="acstddef_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/header/cstddef.html">cstddef</a></div></div>
|
||||
<div class="ttc" id="amin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/min.html">std::min</a></div><div class="ttdeci">T min(T... args)</div></div>
|
||||
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="algorithm_8h_source.html#l00025">algorithm.h:25</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a80033fe071280d537dbd79e19ba5b628"><div class="ttname"><a href="namespaceripple.html#a80033fe071280d537dbd79e19ba5b628">ripple::calculatePercent</a></div><div class="ttdeci">constexpr std::size_t calculatePercent(std::size_t count, std::size_t total)</div><div class="ttdoc">Calculate one number divided by another number in percentage.</div><div class="ttdef"><b>Definition:</b> <a href="MathUtilities_8h_source.html#l00044">MathUtilities.h:44</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition</b> <a href="algorithm_8h_source.html#l00025">algorithm.h:25</a></div></div>
|
||||
<div class="ttc" id="anamespaceripple_html_a80033fe071280d537dbd79e19ba5b628"><div class="ttname"><a href="namespaceripple.html#a80033fe071280d537dbd79e19ba5b628">ripple::calculatePercent</a></div><div class="ttdeci">constexpr std::size_t calculatePercent(std::size_t count, std::size_t total)</div><div class="ttdoc">Calculate one number divided by another number in percentage.</div><div class="ttdef"><b>Definition</b> <a href="MathUtilities_8h_source.html#l00044">MathUtilities.h:44</a></div></div>
|
||||
<div class="ttc" id="asize_t_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/size_t.html">std::size_t</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user