title: Dart language usage
body: <p>I am new to Dart and I have a question regarding casting. </p>
  
  <p>I am trying to cast a MouseEvent.offset Point to a Point. I understand that int is not a subtype of double. So what is the correct way to coerce an int into a double without having to do something like: </p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code>Point p = event.offset; 
  Point&lt;double&gt; dp = new Point&lt;double&gt;(p.x + 0.0, p.y + 0.0); 
  </code></pre>
  
  <p>As expected when I try to do something like: </p>
  
  <pre class="lang-dart prettyprint-override"><code>double x = p.x as double; 
  </code></pre>
  
  <p>an exception is thrown. </p>
  
  <p>Any thoughts? </p>
  
  <p>Thanks.</p>