title: How to detect Infinity values in Scala?
body: <p>Scala has <code>Double.isNaN</code> for detecting not-a-number but no <code>Double.isInf</code> for detecting (positive or negative) infinity.</p>
  
  <p>Why? I'd like to check whether a parameter is a "real" number (i.e. has a numeric value). Converting it to a string and checking for "inf" or something will do it, but there must be a better way?</p>
  
  <p>Like in C++: <a href="http://en.cppreference.com/w/cpp/numeric/math/isinf" rel="noreferrer">http://en.cppreference.com/w/cpp/numeric/math/isinf</a></p>
  
  <p>Using Scala 2.10</p>