[squeak-dev] The Inbox: Kernel-wiz.444.mcz

Casey Ransberger casey.obrien.r at gmail.com
Sun May 2 20:27:34 UTC 2010


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?)

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


More information about the Squeak-dev mailing list