ass="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">sqrt</span><span class="special">;</span>
      <span class="comment">// return the difference between required arc-length, and the calculated arc-length for an</span>
      <span class="comment">// ellipse with radii m_radius and x:</span>
      <span class="identifier">T</span> <span class="identifier">a</span> <span class="special">=</span> <span class="special">(</span><span class="ident