%PDF- %PDF-
Direktori : /usr/share/doc/imath-devel/html/classes/ |
Current File : //usr/share/doc/imath-devel/html/classes/Vec2.html |
<!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Vec2 — Imath Documentation</title> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="../_static/bizstyle.css" type="text/css" /> <script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> <script src="../_static/jquery.js"></script> <script src="../_static/underscore.js"></script> <script src="../_static/doctools.js"></script> <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> <script src="../_static/bizstyle.js"></script> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="Vec3" href="Vec3.html" /> <link rel="prev" title="Sphere3" href="Sphere3.html" /> <meta name="viewport" content="width=device-width,initial-scale=1.0" /> <!--[if lt IE 9]> <script src="_static/css3-mediaqueries.js"></script> <![endif]--> </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="Vec3.html" title="Vec3" accesskey="N">next</a> |</li> <li class="right" > <a href="Sphere3.html" title="Sphere3" accesskey="P">previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Imath</a> »</li> <li class="nav-item nav-item-this"><a href="">Vec2</a></li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="vec2"> <h1>Vec2<a class="headerlink" href="#vec2" title="Permalink to this headline">¶</a></h1> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">#include <Imath/ImathVec.h></span> </pre></div> </div> <p>The <code class="docutils literal notranslate"><span class="pre">Vec2</span></code> class template represents a 2D vector, with predefined typedefs for vectors of type <code class="docutils literal notranslate"><span class="pre">short</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">int64_t</span></code>, <code class="docutils literal notranslate"><span class="pre">float</span></code>, and <code class="docutils literal notranslate"><span class="pre">double</span></code>.</p> <p>Note that the integer specializations of <code class="docutils literal notranslate"><span class="pre">Vec2</span></code> lack the <code class="docutils literal notranslate"><span class="pre">length()</span></code> and <code class="docutils literal notranslate"><span class="pre">normalize()</span></code> methods that are present in the <code class="docutils literal notranslate"><span class="pre">float</span></code> and <code class="docutils literal notranslate"><span class="pre">double</span></code> versions, because the results don’t fit into integer quantities.</p> <p>There are also various utility functions that operate on vectors defined in <code class="docutils literal notranslate"><span class="pre">ImathVecAlgo.h</span></code> and described in <a class="reference internal" href="../functions/vec.html#vector-functions"><span class="std std-ref">Vector Functions</span></a>.</p> <p>Example:</p> <div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="cp">#include</span> <span class="cpf"><Imath/ImathVec.h></span><span class="cp"></span> <span class="kt">void</span> <span class="nf">vec2_example</span><span class="p">()</span> <span class="p">{</span> <span class="n">Imath</span><span class="o">::</span><span class="n">V2f</span> <span class="n">a</span> <span class="p">(</span><span class="mf">1.0f</span><span class="p">,</span> <span class="mf">2.0f</span><span class="p">);</span> <span class="n">Imath</span><span class="o">::</span><span class="n">V2f</span> <span class="n">b</span><span class="p">;</span> <span class="c1">// b is uninitialized</span> <span class="n">b</span><span class="p">.</span><span class="n">x</span> <span class="o">=</span> <span class="n">a</span><span class="p">[</span><span class="mi">0</span><span class="p">];</span> <span class="n">b</span><span class="p">.</span><span class="n">y</span> <span class="o">=</span> <span class="n">a</span><span class="p">[</span><span class="mi">1</span><span class="p">];</span> <span class="n">assert</span> <span class="p">(</span><span class="n">a</span> <span class="o">==</span> <span class="n">b</span><span class="p">);</span> <span class="n">assert</span> <span class="p">(</span><span class="n">a</span><span class="p">.</span><span class="n">length</span><span class="p">()</span> <span class="o">==</span> <span class="n">sqrt</span> <span class="p">(</span><span class="n">a</span> <span class="o">^</span> <span class="n">a</span><span class="p">));</span> <span class="n">a</span><span class="p">.</span><span class="n">normalize</span><span class="p">();</span> <span class="n">assert</span> <span class="p">(</span><span class="n">Imath</span><span class="o">::</span><span class="n">equalWithAbsError</span> <span class="p">(</span><span class="n">a</span><span class="p">.</span><span class="n">length</span><span class="p">(),</span> <span class="mf">1.0f</span><span class="p">,</span> <span class="mf">1e-6f</span><span class="p">));</span> <span class="p">}</span> </pre></div> </div> <dl class="cpp type"> <dt id="_CPPv4N5Imath3V2sE"> <span id="_CPPv3N5Imath3V2sE"></span><span id="_CPPv2N5Imath3V2sE"></span><span id="Imath::V2s"></span><span class="target" id="_imath_vec_8h_1ac8f529cc8f184c2a843ac0ae72436c7e"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><short> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">V2s</code><a class="headerlink" href="#_CPPv4N5Imath3V2sE" title="Permalink to this definition">¶</a><br /></dt> <dd><p><a class="reference internal" href="#class_imath_1_1_vec2"><span class="std std-ref">Vec2</span></a> of short. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath3V2iE"> <span id="_CPPv3N5Imath3V2iE"></span><span id="_CPPv2N5Imath3V2iE"></span><span id="Imath::V2i"></span><span class="target" id="_imath_vec_8h_1acbad65b22b29c90bf860c25833598073"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">V2i</code><a class="headerlink" href="#_CPPv4N5Imath3V2iE" title="Permalink to this definition">¶</a><br /></dt> <dd><p><a class="reference internal" href="#class_imath_1_1_vec2"><span class="std std-ref">Vec2</span></a> of integer. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath5V2i64E"> <span id="_CPPv3N5Imath5V2i64E"></span><span id="_CPPv2N5Imath5V2i64E"></span><span id="Imath::V2i64"></span><span class="target" id="_imath_vec_8h_1a888aba5da272755a23e0eee4c8b9f67c"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int64_t> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">V2i64</code><a class="headerlink" href="#_CPPv4N5Imath5V2i64E" title="Permalink to this definition">¶</a><br /></dt> <dd><p><a class="reference internal" href="#class_imath_1_1_vec2"><span class="std std-ref">Vec2</span></a> of int64_t. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath3V2fE"> <span id="_CPPv3N5Imath3V2fE"></span><span id="_CPPv2N5Imath3V2fE"></span><span id="Imath::V2f"></span><span class="target" id="_imath_vec_8h_1ae145273ce3c999f2b2e61cf0f24e8488"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><float> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">V2f</code><a class="headerlink" href="#_CPPv4N5Imath3V2fE" title="Permalink to this definition">¶</a><br /></dt> <dd><p><a class="reference internal" href="#class_imath_1_1_vec2"><span class="std std-ref">Vec2</span></a> of float. </p> </dd></dl> <dl class="cpp type"> <dt id="_CPPv4N5Imath3V2dE"> <span id="_CPPv3N5Imath3V2dE"></span><span id="_CPPv2N5Imath3V2dE"></span><span id="Imath::V2d"></span><span class="target" id="_imath_vec_8h_1ab989897d79873efedd9fd46eb0614dcd"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><double> <code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">V2d</code><a class="headerlink" href="#_CPPv4N5Imath3V2dE" title="Permalink to this definition">¶</a><br /></dt> <dd><p><a class="reference internal" href="#class_imath_1_1_vec2"><span class="std std-ref">Vec2</span></a> of double. </p> </dd></dl> <dl class="cpp class"> <dt id="_CPPv4I0EN5Imath4Vec2E"> <span id="_CPPv3I0EN5Imath4Vec2E"></span><span id="_CPPv2I0EN5Imath4Vec2E"></span>template<class <code class="sig-name descname">T</code>><br /><span class="target" id="class_imath_1_1_vec2"></span><em class="property">class </em><code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">Vec2</code><a class="headerlink" href="#_CPPv4I0EN5Imath4Vec2E" title="Permalink to this definition">¶</a><br /></dt> <dd><p>2-element vector </p> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Direct access to elements</p> <dl class="cpp var"> <dt id="_CPPv4N5Imath4Vec21xE"> <span id="_CPPv3N5Imath4Vec21xE"></span><span id="_CPPv2N5Imath4Vec21xE"></span><span id="Imath::Vec2::x__T"></span><span class="target" id="class_imath_1_1_vec2_1a8ce17a32240ac63989c34743bee0e352"></span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <code class="sig-name descname">x</code><a class="headerlink" href="#_CPPv4N5Imath4Vec21xE" title="Permalink to this definition">¶</a><br /></dt> <dd></dd></dl> <dl class="cpp var"> <dt id="_CPPv4N5Imath4Vec21yE"> <span id="_CPPv3N5Imath4Vec21yE"></span><span id="_CPPv2N5Imath4Vec21yE"></span><span id="Imath::Vec2::y__T"></span><span class="target" id="class_imath_1_1_vec2_1a02c956d53d8f69d8b8d49b5033fa9974"></span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <code class="sig-name descname">y</code><a class="headerlink" href="#_CPPv4N5Imath4Vec21yE" title="Permalink to this definition">¶</a><br /></dt> <dd></dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Constructors and Assignment</p> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec24Vec2Ev"> <span id="_CPPv3N5Imath4Vec24Vec2Ev"></span><span id="_CPPv2N5Imath4Vec24Vec2Ev"></span><span id="Imath::Vec2::Vec2"></span><span class="target" id="class_imath_1_1_vec2_1ad5a46c22c8c0b06cb870320391b7de6f"></span><em class="property">inline</em> <code class="sig-name descname">Vec2</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec24Vec2Ev" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Uninitialized by default. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec24Vec2E1T"> <span id="_CPPv3N5Imath4Vec24Vec2E1T"></span><span id="_CPPv2N5Imath4Vec24Vec2E1T"></span><span id="Imath::Vec2::Vec2__TCE"></span><span class="target" id="class_imath_1_1_vec2_1a691834bf22a802a78881194dc28517b8"></span><em class="property">inline</em> <em class="property">explicit</em> <em class="property">constexpr</em> <code class="sig-name descname">Vec2</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <em>a</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec24Vec2E1T" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Initialize to a scalar <code class="docutils literal notranslate"><span class="pre">(a,a)</span></code> </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec24Vec2E1T1T"> <span id="_CPPv3N5Imath4Vec24Vec2E1T1T"></span><span id="_CPPv2N5Imath4Vec24Vec2E1T1T"></span><span id="Imath::Vec2::Vec2__T.TCE"></span><span class="target" id="class_imath_1_1_vec2_1a87acca2b747884abf7a0cadd5af4af72"></span><em class="property">inline</em> <em class="property">constexpr</em> <code class="sig-name descname">Vec2</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <em>a</em>, <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <em>b</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec24Vec2E1T1T" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Initialize to given elements <code class="docutils literal notranslate"><span class="pre">(a,b)</span></code> </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec24Vec2ERK4Vec2"> <span id="_CPPv3N5Imath4Vec24Vec2ERK4Vec2"></span><span id="_CPPv2N5Imath4Vec24Vec2ERK4Vec2"></span><span id="Imath::Vec2::Vec2__Vec2CRCE"></span><span class="target" id="class_imath_1_1_vec2_1a4e2ea4b4fdc81130b7d095ae5ddac778"></span><em class="property">inline</em> <em class="property">constexpr</em> <code class="sig-name descname">Vec2</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4N5Imath4Vec24Vec2ERK4Vec2" title="Imath::Vec2::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec24Vec2ERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Copy constructor. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4I0EN5Imath4Vec24Vec2ERK4Vec2I1SE"> <span id="_CPPv3I0EN5Imath4Vec24Vec2ERK4Vec2I1SE"></span><span id="_CPPv2I0EN5Imath4Vec24Vec2ERK4Vec2I1SE"></span>template<class <code class="sig-name descname">S</code>><br /><span class="target" id="class_imath_1_1_vec2_1ac7fe9170e932467eca375a230b5c9205"></span><em class="property">inline</em> <em class="property">constexpr</em> <code class="sig-name descname">Vec2</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec24Vec2ERK4Vec2I1SE" title="Imath::Vec2::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath4Vec24Vec2ERK4Vec2I1SE" title="Imath::Vec2::Vec2::S">S</a>> &<em>v</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4I0EN5Imath4Vec24Vec2ERK4Vec2I1SE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Construct from <a class="reference internal" href="#class_imath_1_1_vec2"><span class="std std-ref">Vec2</span></a> of another base type. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec2aSERK4Vec2"> <span id="_CPPv3N5Imath4Vec2aSERK4Vec2"></span><span id="_CPPv2N5Imath4Vec2aSERK4Vec2"></span><span id="Imath::Vec2::assign-operator__Vec2CRCE"></span><span class="target" id="class_imath_1_1_vec2_1a27834b4c32f40e360d4099f9a5558895"></span><em class="property">inline</em> <em class="property">constexpr</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<code class="sig-name descname">operator=</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec2aSERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Assignment. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec2D0Ev"> <span id="_CPPv3N5Imath4Vec2D0Ev"></span><span id="_CPPv2N5Imath4Vec2D0Ev"></span><span id="Imath::Vec2::~Vec2"></span><span class="target" id="class_imath_1_1_vec2_1ab5ce301d9a317d462e604d052231062c"></span><code class="sig-name descname">~Vec2</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em> = default<a class="headerlink" href="#_CPPv4N5Imath4Vec2D0Ev" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Destructor. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Compatibility with Sb</p> <dl class="cpp function"> <dt id="_CPPv4I0EN5Imath4Vec28setValueEv1S1S"> <span id="_CPPv3I0EN5Imath4Vec28setValueE1S1S"></span><span id="_CPPv2I0EN5Imath4Vec28setValueE1S1S"></span>template<class <code class="sig-name descname">S</code>><br /><span class="target" id="class_imath_1_1_vec2_1a14ca0c015252824453b564a342c8c7f6"></span><em class="property">inline</em> void <code class="sig-name descname">setValue</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec28setValueEv1S1S" title="Imath::Vec2::setValue::S">S</a> <em>a</em>, <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec28setValueEv1S1S" title="Imath::Vec2::setValue::S">S</a> <em>b</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4I0EN5Imath4Vec28setValueEv1S1S" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Set the value. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4I0EN5Imath4Vec28setValueEvRK4Vec2I1SE"> <span id="_CPPv3I0EN5Imath4Vec28setValueERK4Vec2I1SE"></span><span id="_CPPv2I0EN5Imath4Vec28setValueERK4Vec2I1SE"></span>template<class <code class="sig-name descname">S</code>><br /><span class="target" id="class_imath_1_1_vec2_1a4c7bda35af73c585d0ec809237e6f189"></span><em class="property">inline</em> void <code class="sig-name descname">setValue</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath4Vec28setValueEvRK4Vec2I1SE" title="Imath::Vec2::setValue::S">S</a>> &<em>v</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4I0EN5Imath4Vec28setValueEvRK4Vec2I1SE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Set the value. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4I0ENK5Imath4Vec28getValueEvR1SR1S"> <span id="_CPPv3I0ENK5Imath4Vec28getValueER1SR1S"></span><span id="_CPPv2I0ENK5Imath4Vec28getValueER1SR1S"></span>template<class <code class="sig-name descname">S</code>><br /><span class="target" id="class_imath_1_1_vec2_1a1a087b978e584554c39f74e61249b40e"></span><em class="property">inline</em> void <code class="sig-name descname">getValue</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4I0ENK5Imath4Vec28getValueEvR1SR1S" title="Imath::Vec2::getValue::S">S</a> &<em>a</em>, <a class="reference internal" href="#_CPPv4I0ENK5Imath4Vec28getValueEvR1SR1S" title="Imath::Vec2::getValue::S">S</a> &<em>b</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4I0ENK5Imath4Vec28getValueEvR1SR1S" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the value in <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">b</span></code> </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4I0ENK5Imath4Vec28getValueEvR4Vec2I1SE"> <span id="_CPPv3I0ENK5Imath4Vec28getValueER4Vec2I1SE"></span><span id="_CPPv2I0ENK5Imath4Vec28getValueER4Vec2I1SE"></span>template<class <code class="sig-name descname">S</code>><br /><span class="target" id="class_imath_1_1_vec2_1acd64fd89354b87cfe29d5b36e7530027"></span><em class="property">inline</em> void <code class="sig-name descname">getValue</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0ENK5Imath4Vec28getValueEvR4Vec2I1SE" title="Imath::Vec2::getValue::S">S</a>> &<em>v</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4I0ENK5Imath4Vec28getValueEvR4Vec2I1SE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the value in <code class="docutils literal notranslate"><span class="pre">v</span></code> </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec28getValueEv"> <span id="_CPPv3N5Imath4Vec28getValueEv"></span><span id="_CPPv2N5Imath4Vec28getValueEv"></span><span id="Imath::Vec2::getValue"></span><span class="target" id="class_imath_1_1_vec2_1a7f75a021f6ec21b578b0ede1d8862d64"></span><em class="property">inline</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> *<code class="sig-name descname">getValue</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec28getValueEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return a raw pointer to the array of values. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec28getValueEv"> <span id="_CPPv3NK5Imath4Vec28getValueEv"></span><span id="_CPPv2NK5Imath4Vec28getValueEv"></span><span id="Imath::Vec2::getValueC"></span><span class="target" id="class_imath_1_1_vec2_1a8c5c3cbad0a02abb268cdff6f97efa8a"></span><em class="property">inline</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> *<code class="sig-name descname">getValue</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec28getValueEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return a raw pointer to the array of values. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Arithmetic and Comparison</p> <dl class="cpp function"> <dt id="_CPPv4I0ENK5Imath4Vec2eqEbRK4Vec2I1SE"> <span id="_CPPv3I0ENK5Imath4Vec2eqERK4Vec2I1SE"></span><span id="_CPPv2I0ENK5Imath4Vec2eqERK4Vec2I1SE"></span>template<class <code class="sig-name descname">S</code>><br /><span class="target" id="class_imath_1_1_vec2_1a431c3ba07c4fee8adcf06f630963ad64"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">operator==</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0ENK5Imath4Vec2eqEbRK4Vec2I1SE" title="Imath::Vec2::operator==::S">S</a>> &<em>v</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4I0ENK5Imath4Vec2eqEbRK4Vec2I1SE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Equality. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4I0ENK5Imath4Vec2neEbRK4Vec2I1SE"> <span id="_CPPv3I0ENK5Imath4Vec2neERK4Vec2I1SE"></span><span id="_CPPv2I0ENK5Imath4Vec2neERK4Vec2I1SE"></span>template<class <code class="sig-name descname">S</code>><br /><span class="target" id="class_imath_1_1_vec2_1ae190c0f71ce550ef580f03362542c812"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">operator!=</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0ENK5Imath4Vec2neEbRK4Vec2I1SE" title="Imath::Vec2::operator!=::S">S</a>> &<em>v</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4I0ENK5Imath4Vec2neEbRK4Vec2I1SE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Inequality. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec217equalWithAbsErrorERK4Vec2I1TE1T"> <span id="_CPPv3NK5Imath4Vec217equalWithAbsErrorERK4Vec2I1TE1T"></span><span id="_CPPv2NK5Imath4Vec217equalWithAbsErrorERK4Vec2I1TE1T"></span><span id="Imath::Vec2::equalWithAbsError__Vec2:T:CR.TCCE"></span><span class="target" id="class_imath_1_1_vec2_1a3012e4d732b7e18c152c49ce2e2c4664"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">equalWithAbsError</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a>> &<em>v</em>, <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <em>e</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec217equalWithAbsErrorERK4Vec2I1TE1T" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Compare two matrices and test if they are “approximately equal”: </p> <p><dl class="simple"> <dt><strong>Return</strong></dt><dd><p>True if the coefficients of this and <code class="docutils literal notranslate"><span class="pre">m</span></code> are the same with an absolute error of no more than e, i.e., for all i, j: <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">abs</span> <span class="p">(</span><span class="n">this</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">j</span><span class="p">]</span> <span class="o">-</span> <span class="n">m</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">j</span><span class="p">])</span> <span class="o"><=</span> <span class="n">e</span> </pre></div> </div> </p> </dd> </dl> </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec217equalWithRelErrorERK4Vec2I1TE1T"> <span id="_CPPv3NK5Imath4Vec217equalWithRelErrorERK4Vec2I1TE1T"></span><span id="_CPPv2NK5Imath4Vec217equalWithRelErrorERK4Vec2I1TE1T"></span><span id="Imath::Vec2::equalWithRelError__Vec2:T:CR.TCCE"></span><span class="target" id="class_imath_1_1_vec2_1a1fe530c9a388ee1ee780330b1e294107"></span><em class="property">inline</em> <em class="property">constexpr</em> bool <code class="sig-name descname">equalWithRelError</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a>> &<em>v</em>, <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <em>e</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec217equalWithRelErrorERK4Vec2I1TE1T" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Compare two matrices and test if they are “approximately equal”: </p> <p><dl class="simple"> <dt><strong>Return</strong></dt><dd><p>True if the coefficients of this and m are the same with a relative error of no more than e, i.e., for all i, j: <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">abs</span> <span class="p">(</span><span class="n">this</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">-</span> <span class="n">v</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">j</span><span class="p">])</span> <span class="o"><=</span> <span class="n">e</span> <span class="o">*</span> <span class="nb">abs</span> <span class="p">(</span><span class="n">this</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="n">j</span><span class="p">])</span> </pre></div> </div> </p> </dd> </dl> </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec23dotERK4Vec2"> <span id="_CPPv3NK5Imath4Vec23dotERK4Vec2"></span><span id="_CPPv2NK5Imath4Vec23dotERK4Vec2"></span><span id="Imath::Vec2::dot__Vec2CRCCE"></span><span class="target" id="class_imath_1_1_vec2_1a879da7e2034607cf7a057159674bbb8c"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <code class="sig-name descname">dot</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec23dotERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Dot product. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec2eoERK4Vec2"> <span id="_CPPv3NK5Imath4Vec2eoERK4Vec2"></span><span id="_CPPv2NK5Imath4Vec2eoERK4Vec2"></span><span id="Imath::Vec2::xor-operator__Vec2CRCCE"></span><span class="target" id="class_imath_1_1_vec2_1a593757fc63b19bc9847cfe437fed800a"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <code class="sig-name descname">operator^</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec2eoERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Dot product. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec25crossERK4Vec2"> <span id="_CPPv3NK5Imath4Vec25crossERK4Vec2"></span><span id="_CPPv2NK5Imath4Vec25crossERK4Vec2"></span><span id="Imath::Vec2::cross__Vec2CRCCE"></span><span class="target" id="class_imath_1_1_vec2_1afd3fe7978a5b5fa64b0995f443e44ace"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <code class="sig-name descname">cross</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec25crossERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Right-handed cross product, i.e. </p> <p>z component of <a class="reference internal" href="Vec3.html#class_imath_1_1_vec3"><span class="std std-ref">Vec3</span></a> (this->x, this->y, 0) % <a class="reference internal" href="Vec3.html#class_imath_1_1_vec3"><span class="std std-ref">Vec3</span></a> (v.x, v.y, 0) </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec2rmERK4Vec2"> <span id="_CPPv3NK5Imath4Vec2rmERK4Vec2"></span><span id="_CPPv2NK5Imath4Vec2rmERK4Vec2"></span><span id="Imath::Vec2::mod-operator__Vec2CRCCE"></span><span class="target" id="class_imath_1_1_vec2_1a0649f6a4a4c83adc602ec4b2f21cef7c"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <code class="sig-name descname">operator%</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec2rmERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Right-handed cross product, i.e. </p> <p>z component of <a class="reference internal" href="Vec3.html#class_imath_1_1_vec3"><span class="std std-ref">Vec3</span></a> (this->x, this->y, 0) % <a class="reference internal" href="Vec3.html#class_imath_1_1_vec3"><span class="std std-ref">Vec3</span></a> (v.x, v.y, 0) </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec2pLERK4Vec2"> <span id="_CPPv3N5Imath4Vec2pLERK4Vec2"></span><span id="_CPPv2N5Imath4Vec2pLERK4Vec2"></span><span id="Imath::Vec2::add-assign-operator__Vec2CRCE"></span><span class="target" id="class_imath_1_1_vec2_1ac793d6767929bcbea983c816eb8e7616"></span><em class="property">inline</em> <em class="property">constexpr</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<code class="sig-name descname">operator+=</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec2pLERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise addition. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec2plERK4Vec2"> <span id="_CPPv3NK5Imath4Vec2plERK4Vec2"></span><span id="_CPPv2NK5Imath4Vec2plERK4Vec2"></span><span id="Imath::Vec2::add-operator__Vec2CRCCE"></span><span class="target" id="class_imath_1_1_vec2_1ad356349cbc114f0719fa54688f11d6bf"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> <code class="sig-name descname">operator+</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec2plERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise addition. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec2mIERK4Vec2"> <span id="_CPPv3N5Imath4Vec2mIERK4Vec2"></span><span id="_CPPv2N5Imath4Vec2mIERK4Vec2"></span><span id="Imath::Vec2::sub-assign-operator__Vec2CRCE"></span><span class="target" id="class_imath_1_1_vec2_1a3ca8b650c4e2790f8a1ddf3abb72cffe"></span><em class="property">inline</em> <em class="property">constexpr</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<code class="sig-name descname">operator-=</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec2mIERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise subtraction. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec2miERK4Vec2"> <span id="_CPPv3NK5Imath4Vec2miERK4Vec2"></span><span id="_CPPv2NK5Imath4Vec2miERK4Vec2"></span><span id="Imath::Vec2::sub-operator__Vec2CRCCE"></span><span class="target" id="class_imath_1_1_vec2_1a30a19b8277b8bf4c8572185a4fa471b6"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> <code class="sig-name descname">operator-</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec2miERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise subtraction. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec2miEv"> <span id="_CPPv3NK5Imath4Vec2miEv"></span><span id="_CPPv2NK5Imath4Vec2miEv"></span><span id="Imath::Vec2::sub-operatorCCE"></span><span class="target" id="class_imath_1_1_vec2_1a28d43381640e8df2096485fa74f4bdc5"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> <code class="sig-name descname">operator-</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec2miEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise multiplication by -1. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec26negateEv"> <span id="_CPPv3N5Imath4Vec26negateEv"></span><span id="_CPPv2N5Imath4Vec26negateEv"></span><span id="Imath::Vec2::negateCE"></span><span class="target" id="class_imath_1_1_vec2_1a81a6b8ee64051d78488c2b1558afe907"></span><em class="property">inline</em> <em class="property">constexpr</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<code class="sig-name descname">negate</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec26negateEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise multiplication by -1. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec2mLERK4Vec2"> <span id="_CPPv3N5Imath4Vec2mLERK4Vec2"></span><span id="_CPPv2N5Imath4Vec2mLERK4Vec2"></span><span id="Imath::Vec2::mul-assign-operator__Vec2CRCE"></span><span class="target" id="class_imath_1_1_vec2_1a0458da085b5bd37592b1e3a10002ed39"></span><em class="property">inline</em> <em class="property">constexpr</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<code class="sig-name descname">operator*=</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec2mLERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise multiplication. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec2mLE1T"> <span id="_CPPv3N5Imath4Vec2mLE1T"></span><span id="_CPPv2N5Imath4Vec2mLE1T"></span><span id="Imath::Vec2::mul-assign-operator__TCE"></span><span class="target" id="class_imath_1_1_vec2_1aaed1dad12361bb9c08a4d0193b490cbc"></span><em class="property">inline</em> <em class="property">constexpr</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<code class="sig-name descname">operator*=</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <em>a</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec2mLE1T" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise multiplication. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec2mlERK4Vec2"> <span id="_CPPv3NK5Imath4Vec2mlERK4Vec2"></span><span id="_CPPv2NK5Imath4Vec2mlERK4Vec2"></span><span id="Imath::Vec2::mul-operator__Vec2CRCCE"></span><span class="target" id="class_imath_1_1_vec2_1a6679c6f105c042a6ccf2d381675885c2"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> <code class="sig-name descname">operator*</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec2mlERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise multiplication. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec2mlE1T"> <span id="_CPPv3NK5Imath4Vec2mlE1T"></span><span id="_CPPv2NK5Imath4Vec2mlE1T"></span><span id="Imath::Vec2::mul-operator__TCCE"></span><span class="target" id="class_imath_1_1_vec2_1a60b5f34cde51134d310650143bdb9818"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> <code class="sig-name descname">operator*</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <em>a</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec2mlE1T" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise multiplication. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec2dVERK4Vec2"> <span id="_CPPv3N5Imath4Vec2dVERK4Vec2"></span><span id="_CPPv2N5Imath4Vec2dVERK4Vec2"></span><span id="Imath::Vec2::div-assign-operator__Vec2CRCE"></span><span class="target" id="class_imath_1_1_vec2_1a4f1f6a246a112e03edb93f97b209ecc6"></span><em class="property">inline</em> <em class="property">constexpr</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<code class="sig-name descname">operator/=</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec2dVERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise division. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec2dVE1T"> <span id="_CPPv3N5Imath4Vec2dVE1T"></span><span id="_CPPv2N5Imath4Vec2dVE1T"></span><span id="Imath::Vec2::div-assign-operator__TCE"></span><span class="target" id="class_imath_1_1_vec2_1a2050d166b423e2d965861fd70d93670c"></span><em class="property">inline</em> <em class="property">constexpr</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<code class="sig-name descname">operator/=</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <em>a</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec2dVE1T" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise division. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec2dvERK4Vec2"> <span id="_CPPv3NK5Imath4Vec2dvERK4Vec2"></span><span id="_CPPv2NK5Imath4Vec2dvERK4Vec2"></span><span id="Imath::Vec2::div-operator__Vec2CRCCE"></span><span class="target" id="class_imath_1_1_vec2_1a6b0bd8b3b2f8141ed1a12abe141b3b5c"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> <code class="sig-name descname">operator/</code><span class="sig-paren">(</span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<em>v</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec2dvERK4Vec2" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise division. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec2dvE1T"> <span id="_CPPv3NK5Imath4Vec2dvE1T"></span><span id="_CPPv2NK5Imath4Vec2dvE1T"></span><span id="Imath::Vec2::div-operator__TCCE"></span><span class="target" id="class_imath_1_1_vec2_1a251db629af88729d28cc4d519c399d2d"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> <code class="sig-name descname">operator/</code><span class="sig-paren">(</span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <em>a</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec2dvE1T" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Component-wise division. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Query and Manipulation</p> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec26lengthEv"> <span id="_CPPv3NK5Imath4Vec26lengthEv"></span><span id="_CPPv2NK5Imath4Vec26lengthEv"></span><span id="Imath::Vec2::lengthC"></span><span class="target" id="class_imath_1_1_vec2_1a70d99a09f8469d799c0a3b2188affafc"></span><em class="property">inline</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <code class="sig-name descname">length</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec26lengthEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the Euclidean norm. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec27length2Ev"> <span id="_CPPv3NK5Imath4Vec27length2Ev"></span><span id="_CPPv2NK5Imath4Vec27length2Ev"></span><span id="Imath::Vec2::length2CCE"></span><span class="target" id="class_imath_1_1_vec2_1a64a0465755921fd785ba34f1becefb6b"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <code class="sig-name descname">length2</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec27length2Ev" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return the square of the Euclidean norm, i.e. </p> <p>the dot product with itself. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec29normalizeEv"> <span id="_CPPv3N5Imath4Vec29normalizeEv"></span><span id="_CPPv2N5Imath4Vec29normalizeEv"></span><span id="Imath::Vec2::normalize"></span><span class="target" id="class_imath_1_1_vec2_1a893b2021de61b6991327982bf178efc9"></span><em class="property">inline</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<code class="sig-name descname">normalize</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec29normalizeEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Normalize in place. If <a class="reference internal" href="#class_imath_1_1_vec2_1a70d99a09f8469d799c0a3b2188affafc"><span class="std std-ref">length()</span></a>==0, return a null vector. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec212normalizeExcEv"> <span id="_CPPv3N5Imath4Vec212normalizeExcEv"></span><span id="_CPPv2N5Imath4Vec212normalizeExcEv"></span><span id="Imath::Vec2::normalizeExc"></span><span class="target" id="class_imath_1_1_vec2_1a889e3ae70076b720fc5a8f07f469ad8c"></span><em class="property">inline</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<code class="sig-name descname">normalizeExc</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N5Imath4Vec212normalizeExcEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Normalize in place. If <a class="reference internal" href="#class_imath_1_1_vec2_1a70d99a09f8469d799c0a3b2188affafc"><span class="std std-ref">length()</span></a>==0, throw an exception. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec216normalizeNonNullEv"> <span id="_CPPv3N5Imath4Vec216normalizeNonNullEv"></span><span id="_CPPv2N5Imath4Vec216normalizeNonNullEv"></span><span id="Imath::Vec2::normalizeNonNull"></span><span class="target" id="class_imath_1_1_vec2_1ab37b6e29a5d6e21b672a4a32abd38458"></span><em class="property">inline</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a> &<code class="sig-name descname">normalizeNonNull</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec216normalizeNonNullEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Normalize without any checks for <a class="reference internal" href="#class_imath_1_1_vec2_1a70d99a09f8469d799c0a3b2188affafc"><span class="std std-ref">length()</span></a>==0. </p> <p>Slightly faster than the other normalization routines, but if v.length() is 0.0, the result is undefined. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec210normalizedEv"> <span id="_CPPv3NK5Imath4Vec210normalizedEv"></span><span id="_CPPv2NK5Imath4Vec210normalizedEv"></span><span id="Imath::Vec2::normalizedC"></span><span class="target" id="class_imath_1_1_vec2_1a8c558c7ebc638fdf089cd671f5178f94"></span><em class="property">inline</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a>> <code class="sig-name descname">normalized</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec210normalizedEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return a normalized vector. Does not modify *this. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec213normalizedExcEv"> <span id="_CPPv3NK5Imath4Vec213normalizedExcEv"></span><span id="_CPPv2NK5Imath4Vec213normalizedExcEv"></span><span id="Imath::Vec2::normalizedExcC"></span><span class="target" id="class_imath_1_1_vec2_1a1a17dd380024dab1d19bedf28a1664fb"></span><em class="property">inline</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a>> <code class="sig-name descname">normalizedExc</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec213normalizedExcEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return a normalized vector. </p> <p>Does not modify *this. Throw an exception if <a class="reference internal" href="#class_imath_1_1_vec2_1a70d99a09f8469d799c0a3b2188affafc"><span class="std std-ref">length()</span></a>==0. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec217normalizedNonNullEv"> <span id="_CPPv3NK5Imath4Vec217normalizedNonNullEv"></span><span id="_CPPv2NK5Imath4Vec217normalizedNonNullEv"></span><span id="Imath::Vec2::normalizedNonNullC"></span><span class="target" id="class_imath_1_1_vec2_1a447a2bbdb843aa679486ce8f46191a21"></span><em class="property">inline</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a>> <code class="sig-name descname">normalizedNonNull</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec217normalizedNonNullEv" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Return a normalized vector. </p> <p>Does not modify *this, and does not check for <a class="reference internal" href="#class_imath_1_1_vec2_1a70d99a09f8469d799c0a3b2188affafc"><span class="std std-ref">length()</span></a>==0. Slightly faster than the other normalization routines, but if v.length() is 0.0, the result is undefined. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Numeric Limits</p> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a637db05cd9048769fdea3cc0ac86bfe2"></span><code class="sig-name descname">static inline constexpr static T baseTypeLowest () noexcept</code></dt> <dd><p>Largest possible negative value. </p> </dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1aee3ece9854670feac7906f6be1fb1c01"></span><code class="sig-name descname">static inline constexpr static T baseTypeMax () noexcept</code></dt> <dd><p>Largest possible positive value. </p> </dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a04a2c0df2b70ba04044c59653c46e86f"></span><code class="sig-name descname">static inline constexpr static T baseTypeSmallest () noexcept</code></dt> <dd><p>Smallest possible positive value. </p> </dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a22482bc2b2966c47346b76fcfc59bb3e"></span><code class="sig-name descname">static inline constexpr static T baseTypeEpsilon () noexcept</code></dt> <dd><p>Smallest possible e for which 1+e != 1. </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Public Types</p> <dl class="cpp type"> <dt id="_CPPv4N5Imath4Vec28BaseTypeE"> <span id="_CPPv3N5Imath4Vec28BaseTypeE"></span><span id="_CPPv2N5Imath4Vec28BaseTypeE"></span><span id="Imath::Vec2::BaseType"></span><span class="target" id="class_imath_1_1_vec2_1a8f1e5fde22d30cfb5098bdf1cbecfae9"></span><em class="property">typedef </em><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> <code class="sig-name descname">BaseType</code><a class="headerlink" href="#_CPPv4N5Imath4Vec28BaseTypeE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>The base type: In templates that accept a parameter <code class="docutils literal notranslate"><span class="pre">V</span></code>, you can refer to <code class="docutils literal notranslate"><span class="pre">T</span></code> as <code class="docutils literal notranslate"><span class="pre">V::BaseType</span></code> </p> </dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Public Functions</p> <dl class="cpp function"> <dt id="_CPPv4N5Imath4Vec2ixEi"> <span id="_CPPv3N5Imath4Vec2ixEi"></span><span id="_CPPv2N5Imath4Vec2ixEi"></span><span id="Imath::Vec2::subscript-operator__iCE"></span><span class="target" id="class_imath_1_1_vec2_1a54836a7fdb988c8714bad0864c76b7cd"></span><em class="property">inline</em> <em class="property">constexpr</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> &<code class="sig-name descname">operator[]</code><span class="sig-paren">(</span>int <em>i</em><span class="sig-paren">)</span> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4N5Imath4Vec2ixEi" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Element access by index. </p> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4NK5Imath4Vec2ixEi"> <span id="_CPPv3NK5Imath4Vec2ixEi"></span><span id="_CPPv2NK5Imath4Vec2ixEi"></span><span id="Imath::Vec2::subscript-operator__iCCE"></span><span class="target" id="class_imath_1_1_vec2_1a084515357b60644677afdb3c1f74ea9e"></span><em class="property">inline</em> <em class="property">constexpr</em> <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2::T">T</a> &<code class="sig-name descname">operator[]</code><span class="sig-paren">(</span>int <em>i</em><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em><a class="headerlink" href="#_CPPv4NK5Imath4Vec2ixEi" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Element access by index. </p> </dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a3893ce0cf3856f2712796a0632d02877"></span>short <code class="sig-name descname">length</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1aa88e5fba916d029210e622ba6b05d4f1"></span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><short> &<code class="sig-name descname">normalize</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a89b23d8540c4577a7864865a6270d068"></span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><short> &<code class="sig-name descname">normalizeExc</code><span class="sig-paren">(</span><span class="sig-paren">)</span> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a3992acc16b26dbce9e7576e58c97791f"></span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><short> &<code class="sig-name descname">normalizeNonNull</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a918dc838beb26f6a8be58121190f599d"></span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><short> <code class="sig-name descname">normalized</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a0a54dff4573e1513244fc7ce16fdd1dd"></span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><short> <code class="sig-name descname">normalizedExc</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a167e26194cd8a3f25796425cc16b5d26"></span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><short> <code class="sig-name descname">normalizedNonNull</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1af472a664b7a5ac347085db8e7988b81e"></span>int <code class="sig-name descname">length</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1aff906f6f494fa74c60c336dec00f91c0"></span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int> &<code class="sig-name descname">normalize</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a4bb9ab27df9475f8e5341780eec33a8b"></span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int> &<code class="sig-name descname">normalizeExc</code><span class="sig-paren">(</span><span class="sig-paren">)</span> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a0403ce864b539699558cef20a5aa69bf"></span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int> &<code class="sig-name descname">normalizeNonNull</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1abc5b033bed5332e7f86ba45069678f45"></span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int> <code class="sig-name descname">normalized</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a31d1966f3320e020cf8a365141687523"></span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int> <code class="sig-name descname">normalizedExc</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a350a9dc5a5146a75481f5850da3a22fb"></span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int> <code class="sig-name descname">normalizedNonNull</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a42e273474655c8864677da29d700f67c"></span>int64_t <code class="sig-name descname">length</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1aa923354d8d8dcb143b95636035f6358d"></span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int64_t> &<code class="sig-name descname">normalize</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a89cceb2fee652711322c3f999bf36642"></span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int64_t> &<code class="sig-name descname">normalizeExc</code><span class="sig-paren">(</span><span class="sig-paren">)</span> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1af3d5c4c0d8271453539127db65ae8e73"></span><em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int64_t> &<code class="sig-name descname">normalizeNonNull</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1a9dc161e9adbe644ec90cff5626dab190"></span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int64_t> <code class="sig-name descname">normalized</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1ac8df40fa073c3fb18f636e8e4e0b4e8e"></span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int64_t> <code class="sig-name descname">normalizedExc</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> = delete<br /></dt> <dd></dd></dl> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1ae0349c6eb5b4ade4cd7f2cc8ec62843c"></span><a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><int64_t> <code class="sig-name descname">normalizedNonNull</code><span class="sig-paren">(</span><span class="sig-paren">)</span> <em class="property">const</em> <em class="property">noexcept</em> = delete<br /></dt> <dd></dd></dl> </div> <div class="breathe-sectiondef docutils container"> <p class="breathe-sectiondef-title rubric">Public Static Functions</p> <dl class="cpp function"> <dt> <span class="target" id="class_imath_1_1_vec2_1ad504159e234d7191aab6911e60d50952"></span><code class="sig-name descname">static inline constexpr static unsigned int dimensions () noexcept</code></dt> <dd><p>Return the number of dimensions, i.e. 2. </p> </dd></dl> </div> </dd></dl> <dl class="cpp function"> <dt id="_CPPv4I0EN5ImathlsERNSt7ostreamERNSt7ostreamERK4Vec2I1TE"> <span id="_CPPv3I0EN5ImathlsERNSt7ostreamERK4Vec2I1TE"></span><span id="_CPPv2I0EN5ImathlsERNSt7ostreamERK4Vec2I1TE"></span>template<class <code class="sig-name descname">T</code>><br /><span class="target" id="_imath_vec_8h_1a67ca81478b687db729a3f5ff9f1112a3"></span>std::ostream &<code class="sig-prename descclassname">Imath<code class="sig-prename descclassname">::</code></code><code class="sig-name descname">operator<<</code><span class="sig-paren">(</span>std::ostream &<em>s</em>, <em class="property">const</em> <a class="reference internal" href="#_CPPv4I0EN5Imath4Vec2E" title="Imath::Vec2">Vec2</a><<a class="reference internal" href="#_CPPv4I0EN5ImathlsERNSt7ostreamERNSt7ostreamERK4Vec2I1TE" title="Imath::operator<<::T">T</a>> &<em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4I0EN5ImathlsERNSt7ostreamERNSt7ostreamERK4Vec2I1TE" title="Permalink to this definition">¶</a><br /></dt> <dd><p>Stream output, as “(x y)”. </p> </dd></dl> </div> <div class="clearer"></div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <p class="logo"><a href="../index.html"> <img class="logo" src="../_static/imath-logo-blue.png" alt="Logo"/> </a></p> <h4>Previous topic</h4> <p class="topless"><a href="Sphere3.html" title="previous chapter">Sphere3</a></p> <h4>Next topic</h4> <p class="topless"><a href="Vec3.html" title="next chapter">Vec3</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/classes/Vec2.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../search.html" method="get"> <input type="text" name="q" aria-labelledby="searchlabel" /> <input type="submit" value="Go" /> </form> </div> </div> <script>$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="Vec3.html" title="Vec3" >next</a> |</li> <li class="right" > <a href="Sphere3.html" title="Sphere3" >previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Imath</a> »</li> <li class="nav-item nav-item-this"><a href="">Vec2</a></li> </ul> </div> <div class="footer" role="contentinfo"> © Copyright 2021, Contributors to the OpenEXR Project. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.4.3. </div> </body> </html>