<div dir="ltr">Why is it important to you to have a float? Once you&#39;ve truncated it, you have a rational number, by definition. <br>Are you sure you want to truncate the number, rather than performing the truncation in the presentation layer?<br>
<br><div class="gmail_quote">On Wed, Jul 23, 2008 at 10:34 AM, cdrick &lt;<a href="mailto:cdrick65@gmail.com">cdrick65@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">&gt;<br>
&gt; Float has a truncate and round off protocal with metods that truncate<br>
&gt; and round to integer.<br>
&gt;<br>
&gt; So it looks you have to do something like<br>
&gt;<br>
&gt; (aFloat * (10^desiredDecimals) + 0.5) truncated / (10^desiredDecimals)<br>
&gt;<br>
&gt; or without the + 0.5 for truncation.<br>
&gt;<br>
<br>
<br>
</div>close to what I proposed earlier ;-) &nbsp;Just need a conversion to Float<br>
as it returns a fraction.<br>
<br>
so no existing method... Isn&#39;t it something common ?<br>
<div><div></div><div class="Wj3C7c">_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br></div>