The Inbox: Kernel-wiz.444.mcz

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

The Inbox: Kernel-wiz.444.mcz

commits-2
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!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Kernel-wiz.444.mcz

Casey Ransberger-2
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, <[hidden email]> 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