JavaScript: Get 90% of an integer, to the nearest integer?
<p>I'm working on a Google Maps marker in JavaScript. Its height is created as a google.maps.Point, which must have an integer width and height. </p>

<p>Here's my problem. I want the width of the <em>shadow</em> of the marker to be 90% as tall as the height of the marker. I don't know the height in advance.</p>

<p>If I set:</p>

<pre><code>var shadowDimensions = new google.maps.Point(height*0.9,height);
</code></pre>

<p>and <code>height*0.9</code> is not an integer, I get an error.</p>

<p>How can I define "<code>height*0.9</code> to the nearest integer" in JavaScript?</p>

<p>Thanks!</p>
