<div>Hi</div>
<div>ScaledDecimal is not in the Etoy image :-(</div>
<div>Licence issue I think...</div>
<div>I'll use the printShowingDecimalPlaces: </div>
<div>Thank you</div>
<div> </div>
<div>Karl<br><br></div>
<div class="gmail_quote">On Thu, Aug 4, 2011 at 3:12 PM, Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I see two workaround if you know the increment is 0.01<br>1) use a ScaledDecimal rather than a Float with 2 decimal places.<br>
2) use printShowingDecimalPlaces: 2 to render the morph<br><br>Nicolas<br><br>2011/8/4 karl ramberg <<a href="mailto:karlramberg@gmail.com">karlramberg@gmail.com</a>>:<br>
<div>
<div></div>
<div class="h5">> We have a issue in Etoys where this bites us.<br>> We get a huge float instead of a expected zero.<br>> <a href="http://tracker.squeakland.org/browse/SQ-946" target="_blank">http://tracker.squeakland.org/browse/SQ-946</a><br>
><br>> Karl<br>><br>><br>> On Thu, Aug 4, 2011 at 2:20 PM, David T. Lewis <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br>>><br>>> On Thu, Aug 04, 2011 at 11:20:41AM +0200, Bert Freudenberg wrote:<br>
>> > Hi,<br>>> ><br>>> > I'd like to print decimal Floats with at most n significant digits. E.g.<br>>> ><br>>> > 123456 roundToSignificantDigits: 3<br>>> > => 123000<br>
>> > 0.00123456 roundToSignificantDigits: 3<br>>> > => 0.00123<br>>> ><br>>> > Would this generally be useful? If so, what would a good selector be?<br>>> > And what a good implementation? Instead of rounding I'd be happy to just get<br>
>> > a String.<br>>><br>>> IMO, if it isn't considered useful, then it *should* be ;) Having grown<br>>> up with slide rules, I'm always annoyed by display of numbers with more<br>>> precision than is physically possible or computationally meaningful.<br>
>> So +1 from me.<br>>><br>>> Answering a String seems good, because the typical use case would<br>>> be to display a number to some number of significant digits, but<br>>> not to change the value of the number itself.<br>
>><br>>> Dave<br>>><br>>><br>><br>><br>><br>><br>><br><br></div></div></blockquote></div><br>