title: calculating distance from one point to another
body: <p>So i have my double that calculates the distance</p>
  
  <pre><code>    double calculate2DDistance(int x1, int y1, int x2, int y2)
  {
      return sqrt((x2 - x1)^2 + (y2 - y1)^2);
  }
  </code></pre>
  
  <p>Note i'm calling this method from a header called math.h into my main</p>
  
  <p>My testing line in main.h</p>
  
  <pre><code>cout &lt;&lt; calculate2DDistance(2.0, 4.0, 3.0, 1.0) &lt;&lt; endl;
  </code></pre>
  
  <p>and it either prints out the completely wrong answer or -1.#IND</p>
  
  <p>Whats going on ?</p>