title: Howto use glm constants in c++/opengl
body: <p>I am programming with just OpenGL and use GLM (<a href="https://glm.g-truc.net" rel="noreferrer">OpenGL Mathematics</a>). I found out that there is this extension in GLM called "GLM_GTC_constants" that should provide a list of built-in constants. This is how a function header looks in <code>constants.hpp</code>:</p>
  
  <pre><code>/// Return the pi constant.
  /// @see gtc_constants
  template &lt;typename genType&gt;
  GLM_FUNC_DECL GLM_CONSTEXPR genType pi();
  </code></pre>
  
  <p>The function itself looks like this (<code>constants.inl</code>):</p>
  
  <pre><code>template &lt;typename genType&gt;
  GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi()
  {
      return genType(3.14159265358979323846264338327950288);
  }
  </code></pre>
  
  <p>Now I'm wondering how to use this function.</p>
  
  <hr>
  
  <pre><code>glm::pi();
  </code></pre>
  
  <p>Using the function like above doesn't work.</p>
  
  <pre><code>float PI = glm::pi();
  </code></pre>
  
  <p>The code above, for example, gives me this error:</p>
  
  <pre><code>error: no matching function for call to ‘pi()’
  </code></pre>
  
  <p>I searched the documentation but did not find a usage example of those constants anywhere.</p>