The Inbox: Kernel-wiz.444.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Kernel-wiz.444.mcz

Jerome Peace
>Casey Ransberger casey.obrien.r at gmail.com
>Sun May 2 20:27:34 UTC 2010
>
Hi Casey,
>
>Last night I wanted to round a number to an arbitrary precision; (finally
>got sick of calculating tips in workspaces, heh) is that what this is for
>(seems like it?)
>
Yes. It's part of a set of selectors to aid in precision rounding, truncation and what not. This one was somehow overlooked when the others were uploaded. Look at roundoff and trunction categories in Number, Point, and Rectangle. Note there is also a #roundUpTo: .

The problem I ran across was that gribbles on the screen were being caused by bounds that changed shape and invalid rectanges that were not being made large enough.

The first step was to get the support and the second to go fix things. So far only step one has been tackled.

I am not as avid in my bug hunting as I was before. So its going to be up to others to help get the off-by-one and cumulative rounding/truncation errors fixed.

Yours in curiosity and service, --Jerome Peace



>On Sun, May 2, 2010 at 12:39 PM, <commits at source.squeak.org> wrote:
>
>> A new version of Kernel was added to project The Inbox:
>> http://source.squeak.org/inbox/Kernel-wiz.444.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Kernel-wiz.444
>> Author: wiz
>> Time: 2 May 2010, 3:39:34.852 pm
>> UUID: 3a8f4eb1-7d22-4398-a30b-0c674e73a0f7
>> Ancestors: Kernel-ar.443
>>
>> This adds Number>>roundDownTo:
>>
>> Currently it is missing. Essentialy it is an umimplemented call. Called by:
>> 'Point roundDownTo: {*Morphic-Truncation and Roundoff}' 'Rectangle
>> compressTo: {*Morphic-Truncation and Roundoff}' 'Rectangle expandTo:
>> {*Morphic-Truncation and Roundoff}'
>>
>> It doesn't show up as unimplemented because the selector is used by Point.
>> However, if it is not present the other three methods will raise a stink.
>>
>>
>>
>> =============== Diff against Kernel-ar.443 ===============
>>
>> Item was added:
>> + ----- Method: Number>>roundDownTo: (in category 'truncation and round
>> off') -----
>> + roundDownTo: aNumber
>> +       "Answer the next multiple of aNumber toward negative infinity that
>> is nearest the
>> +       receiver."
>> +
>> +       ^(self/aNumber) floor * aNumber!
>>
>>
>>
>
>
>--
>Casey Ransberger
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100502/7370e9fd/attachment.htm
>
>    * Previous message: [squeak-dev] The Trunk: HelpSystem-Tests-tbn.11.mcz
>    * Next message: [squeak-dev] The Trunk: HelpSystem-Core-tbn.47.mcz
>    * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>
>More information about the Squeak-dev mailing list
>