title: Scala can not convert expression of Double to Int
body: <p>I have the following method, which returns the absolute value of the distance between two points as an <code>Int</code>. </p>
  
  <pre><code>  def absDist(a: Tuple2[Int, Int], b: Tuple2[Int, Int]): Int = {
      ((scala.math.pow(a._1 - b._1, 2) + scala.math.pow(a._2 - b._2, 2)): Int)
    }
  </code></pre>
  
  <p>However, the type can not be converted:</p>
  
  <pre><code>Expression of type Double doesn't conform to expected type Int
  </code></pre>
  
  <p>Why is this happening? My conversion looks good to me.</p>