title: What's the difference between M_PI and M_PI_2?
body: <p>I forked a project from Github, Xcode shows a lot of warnings: </p>
  
  <blockquote>
    <p>'M_PI' is deprecated: Please use 'Double.pi' or '.pi' to get the value
    of correct type and avoid casting.</p>
  </blockquote>
  
  <p>and </p>
  
  <blockquote>
    <p>'M_PI_2' is deprecated: Please use 'Double.pi' or '.pi' to get the value
    of correct type and avoid casting.</p>
  </blockquote>
  
  <p>Since both <code>M_PI</code> and <code>M_PI_2</code> are prompted to be replaced by <code>Double.pi</code>, I assume there are in fact the same value. However, there's this code in the project: </p>
  
  <pre><code>switch angle {
  
      case M_PI_2:
          ...
  
      case M_PI:
          ...
  
      case Double.pi * 3:
          ...
  
      default:
          ...
  
  }
  </code></pre>
  
  <p>I'm really confused here, are <code>M_PI</code> and <code>M_PI_2</code> different? or are they just the same?</p>
  
  <p><strong>UPDATE:</strong> </p>
  
  <p>It turns out to be my blunder, Xcode says 'M_PI_2' is deprecated: Please use <code>Double.pi / 2</code> or <code>.pi / 2</code> to get the value of correct type and avoid casting. so it isn't a bug, just too hard to notice the difference of 2 prompts. </p>