Math.ceil not rounding the value
<pre><code>double totalInches = d * 0.3937;
double feetPart = totalInches / 12;
int inchesPart = (int) Math.ceil(totalInches - (feetPart * 12));
return (feetPart) + "' " + inchesPart + "''";
</code></pre>

<p>I am getting a value <code>6.9999999 ' 0"</code>. I am returning a string, is it the reason why the decimals values in feet is not getting rounded off. </p>

<p>I tried without casting too. <code>double inchesPart = Math.ceil(totalInches - (feetPart * 12));</code>, but still i get the same result.</p>
