title: Calculate the 3d distance between point and plane, C++
body: <p>I'm using:
  D = |ax + by + cz + d| / |n| where n is the normal to plane; a, b, c, d are the coefficients of the equation of the plane; x, y, z are the coordinates of the point from the plane. 
  To calculate the distance from a 3d point to a 3d plane. The issue that I'm having is that the distances in question are extremely small and this is causing the result( a double ) to be represented in scientific notation, which is not handled correctly in if statements. For example:</p>
  
  <pre><code>if( dist == 0 )
  {
      //Execute this
  }
  </code></pre>
  
  <p>If dist is any scientific number the code inside the if statement is executed, even though dist is not 0. My question is, is there anyway the scientific number can be converted back into fixed notation to make it usable in if statements similar to these?? 
  Im using VisualStudio 2010, C++.</p>