title: Why do M_PI_2, M_PI_4, M_1_PI, and M_2_PI exist?
body: <p>I do understand why we have this in standard headers:</p>
  
  <pre><code>#define M_PI       3.14159265358979323846   // pi
  </code></pre>
  
  <p>However, I don't see much benefit in having these:</p>
  
  <pre><code>#define M_PI_2     1.57079632679489661923   // pi/2
  #define M_PI_4     0.785398163397448309616  // pi/4
  #define M_1_PI     0.318309886183790671538  // 1/pi
  #define M_2_PI     0.636619772367581343076  // 2/pi
  </code></pre>
  
  <p><strong>Is there any advantage in using these instead of <code>M_PI/2</code>, <code>M_PI/4</code>, <code>1/M_PI</code> and <code>2/M_PI</code> in actual code?</strong> (In 2020 and beyond?)</p>
  
  <p>Aren't the spelled-out expressions much more readable?</p>
  
  <hr>
  
  <p>I'm asking for a couple of reasons really.</p>
  
  <p>Firstly, one day I accidentally mixed up <code>M_PI_2</code> and <code>M_2_PI</code> (and maybe even <code>2 * M_PI</code>). Took a while to figure out something was wrong, and after that took another while to find out what exactly was the root cause. Still think it's not super obvious what <code>M_PI_2</code> and <code>M_2_PI</code> mean, if you are just reading code using them and don't see the definitions. And why should I memorize something like that? So, is it safe to say that using these definitions is actually an anti-pattern that degrades code readability?</p>
  
  <p>Secondly, <a href="https://github.com/xdspacelab/openvslam/pull/217#discussion_r387088971" rel="nofollow noreferrer">having these definitions available may still be an issue, e.g. in Windows (Visual C++)</a>. Instead of defining all these, I'd prefer to define only <code>M_PI</code>, and then say <code>M_PI/2</code> and not <code>M_PI_2</code> in the code. Is there something I'm missing?</p>