glm/doc/api/a00002_source.html

109 lines
39 KiB
HTML
Raw Normal View History

2017-08-15 19:22:51 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
2018-09-02 21:34:18 +00:00
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>0.9.9 API documentation: common.hpp Source File</title>
2017-08-15 19:22:51 +00:00
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
2017-08-17 18:39:22 +00:00
<td id="projectlogo"><img alt="Logo" src="logo-mini.png"/></td>
2017-08-15 19:22:51 +00:00
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">0.9.9 API documentation
2017-08-15 19:22:51 +00:00
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
2018-09-02 21:34:18 +00:00
<!-- Generated by Doxygen 1.8.14 -->
2017-08-15 19:22:51 +00:00
<script type="text/javascript">
2018-09-02 21:34:18 +00:00
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
2017-08-15 19:22:51 +00:00
var searchBox = new SearchBox("searchBox", "search",false,'Search');
2018-09-02 21:34:18 +00:00
/* @license-end */
2017-08-15 19:22:51 +00:00
</script>
2018-09-02 21:34:18 +00:00
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
2017-08-15 19:22:51 +00:00
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
2018-09-02 21:34:18 +00:00
<li class="navelem"><a class="el" href="dir_d522931ffa1371640980b621734a4381.html">Users</a></li><li class="navelem"><a class="el" href="dir_02cc19cee4c4780485bfe81520450212.html">christophericcio</a></li><li class="navelem"><a class="el" href="dir_54de7df3bc9880881b14ec07f256fd2e.html">Documents</a></li><li class="navelem"><a class="el" href="dir_6399a054f5929b58eaa476233e406ce8.html">Repository</a></li><li class="navelem"><a class="el" href="dir_627f4a52155b61a75c7c4851d7df9027.html">Github</a></li><li class="navelem"><a class="el" href="dir_ffdfd01cf51cdb2fe8bd5e55c6e0c4e8.html">glm</a></li><li class="navelem"><a class="el" href="dir_4ca6aa55b50e6be994025af27820140e.html">glm</a></li> </ul>
2017-08-15 19:22:51 +00:00
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
2018-09-02 21:34:18 +00:00
<div class="title">common.hpp</div> </div>
2017-08-15 19:22:51 +00:00
</div><!--header-->
<div class="contents">
2018-09-02 21:34:18 +00:00
<a href="a00002.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#include &quot;detail/qualifier.hpp&quot;</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#include &quot;detail/_fixes.hpp&quot;</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="keyword">namespace </span><a class="code" href="a00792.html">glm</a></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;{</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> genType&gt;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; GLM_FUNC_DECL GLM_CONSTEXPR genType <a class="code" href="a00662.html#ga81d3abddd0ef0c8de579bc541ecadab6">abs</a>(genType x);</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keyword">template</span>&lt;length_t L, <span class="keyword">typename</span> T, qualifier Q&gt;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; GLM_FUNC_DECL GLM_CONSTEXPR vec&lt;L, T, Q&gt; <a class="code" href="a00662.html#ga81d3abddd0ef0c8de579bc541ecadab6">abs</a>(vec&lt;L, T, Q&gt; <span class="keyword">const</span>&amp; x);</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keyword">template</span>&lt;length_t L, <span class="keyword">typename</span> T, qualifier Q&gt;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; GLM_FUNC_DECL vec&lt;L, T, Q&gt; <a class="code" href="a00662.html#ga1e2e5cfff800056540e32f6c9b604b28">sign</a>(vec&lt;L, T, Q&gt; <span class="keyword">const</span>&amp; x);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keyword">template</span>&lt;length_t L, <span class="keyword">typename</span> T, qualifier Q&gt;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; GLM_FUNC_DECL vec&lt;L, T, Q&gt; <a class="code" href="a00662.html#gaa9d0742639e85b29c7c5de11cfd6840d">floor</a>(vec&lt;L, T, Q&gt; <span class="keyword">const</span>&amp; x);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keyword">template</span>&lt;length_t L, <span class="keyword">typename</span> T, qualifier Q&gt;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; GLM_FUNC_DECL vec&lt;L, T, Q&gt; <a class="code" href="a00662.html#gaf9375e3e06173271d49e6ffa3a334259">trunc</a>(vec&lt;L, T, Q&gt; <span class="keyword">const</span>&amp; x);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keyword">template</span>&lt;length_t L, <span class="keyword">typename</span> T, qualifier Q&gt;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; GLM_FUNC_DECL vec&lt;L, T, Q&gt; <a cl
<div class="ttc" id="a00662_html_gaa9d0742639e85b29c7c5de11cfd6840d"><div class="ttname"><a href="a00662.html#gaa9d0742639e85b29c7c5de11cfd6840d">glm::floor</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, T, Q &gt; floor(vec&lt; L, T, Q &gt; const &amp;x)</div><div class="ttdoc">Returns a value equal to the nearest integer that is less then or equal to x. </div></div>
<div class="ttc" id="a00662_html_gad0f444d4b81cc53c3b6edf5aa25078c2"><div class="ttname"><a href="a00662.html#gad0f444d4b81cc53c3b6edf5aa25078c2">glm::fma</a></div><div class="ttdeci">GLM_FUNC_DECL genType fma(genType const &amp;a, genType const &amp;b, genType const &amp;c)</div><div class="ttdoc">Computes and returns a * b + c. </div></div>
<div class="ttc" id="a00662_html_ga562edf7eca082cc5b7a0aaf180436daf"><div class="ttname"><a href="a00662.html#ga562edf7eca082cc5b7a0aaf180436daf">glm::smoothstep</a></div><div class="ttdeci">GLM_FUNC_DECL genType smoothstep(genType edge0, genType edge1, genType x)</div><div class="ttdoc">Returns 0.0 if x &lt;= edge0 and 1.0 if x &gt;= edge1 and performs smooth Hermite interpolation between 0 a...</div></div>
<div class="ttc" id="a00662_html_gafa03aca8c4713e1cc892aa92ca135a7e"><div class="ttname"><a href="a00662.html#gafa03aca8c4713e1cc892aa92ca135a7e">glm::round</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, T, Q &gt; round(vec&lt; L, T, Q &gt; const &amp;x)</div><div class="ttdoc">Returns a value equal to the nearest integer to x. </div></div>
<div class="ttc" id="a00662_html_gaf9375e3e06173271d49e6ffa3a334259"><div class="ttname"><a href="a00662.html#gaf9375e3e06173271d49e6ffa3a334259">glm::trunc</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, T, Q &gt; trunc(vec&lt; L, T, Q &gt; const &amp;x)</div><div class="ttdoc">Returns a value equal to the nearest integer to x whose absolute value is not larger than the absolut...</div></div>
<div class="ttc" id="a00662_html_ga20620e83544d1a988857a3bc4ebe0e1d"><div class="ttname"><a href="a00662.html#ga20620e83544d1a988857a3bc4ebe0e1d">glm::frexp</a></div><div class="ttdeci">GLM_FUNC_DECL genType frexp(genType const &amp;x, genIType &amp;exp)</div><div class="ttdoc">Splits x into a floating-point significand in the range [0.5, 1.0) and an integral exponent of two...</div></div>
<div class="ttc" id="a00662_html_gaf4a5fc81619c7d3e8b22f53d4a098c7f"><div class="ttname"><a href="a00662.html#gaf4a5fc81619c7d3e8b22f53d4a098c7f">glm::step</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, T, Q &gt; step(vec&lt; L, T, Q &gt; const &amp;edge, vec&lt; L, T, Q &gt; const &amp;x)</div><div class="ttdoc">Returns 0.0 if x &lt; edge, otherwise it returns 1.0. </div></div>
<div class="ttc" id="a00662_html_ga9b197a452cd52db3c5c18bac72bd7798"><div class="ttname"><a href="a00662.html#ga9b197a452cd52db3c5c18bac72bd7798">glm::mod</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, T, Q &gt; mod(vec&lt; L, T, Q &gt; const &amp;x, vec&lt; L, T, Q &gt; const &amp;y)</div><div class="ttdoc">Modulus. </div></div>
<div class="ttc" id="a00662_html_ga97f46b5f7b42fe44482e13356eb394ae"><div class="ttname"><a href="a00662.html#ga97f46b5f7b42fe44482e13356eb394ae">glm::uintBitsToFloat</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, float, Q &gt; uintBitsToFloat(vec&lt; L, uint, Q &gt; const &amp;v)</div><div class="ttdoc">Returns a floating-point value corresponding to a unsigned integer encoding of a floating-point value...</div></div>
<div class="ttc" id="a00662_html_ga2df623004f634b440d61e018d62c751b"><div class="ttname"><a href="a00662.html#ga2df623004f634b440d61e018d62c751b">glm::fract</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, T, Q &gt; fract(vec&lt; L, T, Q &gt; const &amp;x)</div><div class="ttdoc">Return x - floor(x). </div></div>
<div class="ttc" id="a00662_html_ga85e33f139b8db1b39b590a5713b9e679"><div class="ttname"><a href="a00662.html#ga85e33f139b8db1b39b590a5713b9e679">glm::modf</a></div><div class="ttdeci">GLM_FUNC_DECL genType modf(genType x, genType &amp;i)</div><div class="ttdoc">Returns the fractional part of x and sets i to the integer part (as a whole number floating point val...</div></div>
<div class="ttc" id="a00664_html_ga071566cadc7505455e611f2a0353f4d4"><div class="ttname"><a href="a00664.html#ga071566cadc7505455e611f2a0353f4d4">glm::exp</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, T, Q &gt; exp(vec&lt; L, T, Q &gt; const &amp;v)</div><div class="ttdoc">Returns the natural exponentiation of x, i.e., e^x. </div></div>
<div class="ttc" id="a00662_html_ga7a0a8291a1cf3e1c2aee33030a1bd7b0"><div class="ttname"><a href="a00662.html#ga7a0a8291a1cf3e1c2aee33030a1bd7b0">glm::intBitsToFloat</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, float, Q &gt; intBitsToFloat(vec&lt; L, int, Q &gt; const &amp;v)</div><div class="ttdoc">Returns a floating-point value corresponding to a signed integer encoding of a floating-point value...</div></div>
<div class="ttc" id="a00662_html_gaa0f2f12e9108b09e22a3f0b2008a0b5d"><div class="ttname"><a href="a00662.html#gaa0f2f12e9108b09e22a3f0b2008a0b5d">glm::clamp</a></div><div class="ttdeci">GLM_FUNC_DECL GLM_CONSTEXPR vec&lt; L, T, Q &gt; clamp(vec&lt; L, T, Q &gt; const &amp;x, vec&lt; L, T, Q &gt; const &amp;minVal, vec&lt; L, T, Q &gt; const &amp;maxVal)</div><div class="ttdoc">Returns min(max(x, minVal), maxVal) for each component in x using the floating-point values minVal an...</div></div>
<div class="ttc" id="a00662_html_ga81d3abddd0ef0c8de579bc541ecadab6"><div class="ttname"><a href="a00662.html#ga81d3abddd0ef0c8de579bc541ecadab6">glm::abs</a></div><div class="ttdeci">GLM_FUNC_DECL GLM_CONSTEXPR vec&lt; L, T, Q &gt; abs(vec&lt; L, T, Q &gt; const &amp;x)</div><div class="ttdoc">Returns x if x &gt;= 0; otherwise, it returns -x. </div></div>
<div class="ttc" id="a00662_html_ga1e2e5cfff800056540e32f6c9b604b28"><div class="ttname"><a href="a00662.html#ga1e2e5cfff800056540e32f6c9b604b28">glm::sign</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, T, Q &gt; sign(vec&lt; L, T, Q &gt; const &amp;x)</div><div class="ttdoc">Returns 1.0 if x &gt; 0, 0.0 if x == 0, or -1.0 if x &lt; 0. </div></div>
<div class="ttc" id="a00662_html_ga52e319d7289b849ec92055abd4830533"><div class="ttname"><a href="a00662.html#ga52e319d7289b849ec92055abd4830533">glm::ldexp</a></div><div class="ttdeci">GLM_FUNC_DECL genType ldexp(genType const &amp;x, genIType const &amp;exp)</div><div class="ttdoc">Builds a floating-point number from x and the corresponding integral exponent of two in exp...</div></div>
<div class="ttc" id="a00662_html_ga49418ba4c8a60fbbb5d57b705f3e26db"><div class="ttname"><a href="a00662.html#ga49418ba4c8a60fbbb5d57b705f3e26db">glm::floatBitsToUint</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, uint, Q &gt; floatBitsToUint(vec&lt; L, float, Q &gt; const &amp;v)</div><div class="ttdoc">Returns a unsigned integer value representing the encoding of a floating-point value. </div></div>
<div class="ttc" id="a00662_html_ga31f49ef9e7d1beb003160c5e009b0c48"><div class="ttname"><a href="a00662.html#ga31f49ef9e7d1beb003160c5e009b0c48">glm::min</a></div><div class="ttdeci">GLM_FUNC_DECL GLM_CONSTEXPR vec&lt; L, T, Q &gt; min(vec&lt; L, T, Q &gt; const &amp;x, vec&lt; L, T, Q &gt; const &amp;y)</div><div class="ttdoc">Returns y if y &lt; x; otherwise, it returns x. </div></div>
<div class="ttc" id="a00662_html_ga8e93f374aae27d1a88b921860351f8d4"><div class="ttname"><a href="a00662.html#ga8e93f374aae27d1a88b921860351f8d4">glm::mix</a></div><div class="ttdeci">GLM_FUNC_DECL genTypeT mix(genTypeT x, genTypeT y, genTypeU a)</div><div class="ttdoc">If genTypeU is a floating scalar or vector: Returns x * (1.0 - a) + y * a, i.e., the linear blend of ...</div></div>
<div class="ttc" id="a00662_html_ga29ef934c00306490de837b4746b4e14d"><div class="ttname"><a href="a00662.html#ga29ef934c00306490de837b4746b4e14d">glm::isnan</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, bool, Q &gt; isnan(vec&lt; L, T, Q &gt; const &amp;x)</div><div class="ttdoc">Returns true if x holds a NaN (not a number) representation in the underlying implementation&amp;#39;s set of...</div></div>
<div class="ttc" id="a00662_html_ga2885587c23a106301f20443896365b62"><div class="ttname"><a href="a00662.html#ga2885587c23a106301f20443896365b62">glm::isinf</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, bool, Q &gt; isinf(vec&lt; L, T, Q &gt; const &amp;x)</div><div class="ttdoc">Returns true if x holds a positive infinity or negative infinity representation in the underlying imp...</div></div>
<div class="ttc" id="a00792_html"><div class="ttname"><a href="a00792.html">glm</a></div><div class="ttdef"><b>Definition:</b> <a href="a00002_source.html#l00020">common.hpp:20</a></div></div>
<div class="ttc" id="a00662_html_ga99f7d62f78ac5ea3b49bae715c9488ed"><div class="ttname"><a href="a00662.html#ga99f7d62f78ac5ea3b49bae715c9488ed">glm::floatBitsToInt</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, int, Q &gt; floatBitsToInt(vec&lt; L, float, Q &gt; const &amp;v)</div><div class="ttdoc">Returns a signed integer value representing the encoding of a floating-point value. </div></div>
<div class="ttc" id="a00662_html_gac1fec0c3303b572a6d4697a637213870"><div class="ttname"><a href="a00662.html#gac1fec0c3303b572a6d4697a637213870">glm::max</a></div><div class="ttdeci">GLM_FUNC_DECL GLM_CONSTEXPR vec&lt; L, T, Q &gt; max(vec&lt; L, T, Q &gt; const &amp;x, vec&lt; L, T, Q &gt; const &amp;y)</div><div class="ttdoc">Returns y if x &lt; y; otherwise, it returns x. </div></div>
<div class="ttc" id="a00662_html_gafb9d2a645a23aca12d4d6de0104b7657"><div class="ttname"><a href="a00662.html#gafb9d2a645a23aca12d4d6de0104b7657">glm::ceil</a></div><div class="ttdeci">GLM_FUNC_DECL vec&lt; L, T, Q &gt; ceil(vec&lt; L, T, Q &gt; const &amp;x)</div><div class="ttdoc">Returns a value equal to the nearest integer that is greater than or equal to x. </div></div>
2017-08-15 19:22:51 +00:00
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
2018-09-02 21:34:18 +00:00
</a> 1.8.14
2017-08-15 19:22:51 +00:00
</small></address>
</body>
</html>