<div dir="ltr"><div>I&#39;ve been working on a math library for SwiftGL. It&#39;s looking good. Vector2, Vector3, Vector4, Matrix2x2, Matrix3x3, Matrix4x4 are implemented with all arithmetic. You can even swizzle just like GLSL.</div><div><br></div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="color:rgb(187,44,162)">var</span> myVec = <span style="color:rgb(79,129,135)">vec4</span>(<span style="color:rgb(39,42,216)">1</span>, <span style="color:rgb(39,42,216)">2</span>, <span style="color:rgb(39,42,216)">3</span>, <span style="color:rgb(39,42,216)">4</span>)</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(79,129,135)">myVec<span style="color:rgb(0,0,0)">.</span>ab<span style="color:rgb(0,0,0)"> = </span>vec2<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(39,42,216)">99</span><span style="color:rgb(0,0,0)">, </span><span style="color:rgb(39,42,216)">98</span><span style="color:rgb(0,0,0)">)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)"><span style="color:rgb(61,29,129)">print</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(79,129,135)">myVec</span><span style="color:rgb(0,0,0)">) </span>//=&gt; (1, 2, 98, 99)</p></div><div><br></div><div>There&#39;s still a lot to do. I hope to have feature parity with GLSL done this week. But it&#39;s ready to set free and get feedback.</div><div><br></div><a href="https://github.com/AE9RB/SwiftGL">https://github.com/AE9RB/SwiftGL</a><br><div><br></div><div>And a couple questions. Is there any way to make <span style="font-family:Menlo;font-size:11px;color:rgb(187,44,162)">import</span><span style="font-family:Menlo;font-size:11px"> SwiftGL.Math </span>work? Note the dot. Also, is there anything reasonable I can do to improve the compile time? 3.5 minutes for 2000 lines of code can&#39;t be right.</div><div><br></div><div>-David &quot;Expression was too complex to be solved&quot; Turnbull<br></div><div><br></div></div>