[squeak-dev] The Trunk: Kernel-ul.596.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Jun 13 10:03:14 UTC 2011
Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.596.mcz
==================== Summary ====================
Name: Kernel-ul.596
Author: ul
Time: 13 June 2011, 12:02:09.223 pm
UUID: 4ec84fe6-a346-6544-aba2-60ae51a2937b
Ancestors: Kernel-ul.595, Kernel-cbc.593
Merged.
=============== Diff against Kernel-ul.595 ===============
Item was changed:
----- 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."
+ "Examples:
+ 3.1479 roundDownTo: 0.01 -> 3.14
+ 3.1479 roundDownTo: 0.1 -> 3.1
+ 1923 roundDownTo: 10 -> 1920
+ 3.1479 roundDownTo: 0.005 -> 3.145
+ -3.1479 roundDownTo: 0.01 -> -3.15"
+
-
^(self/aNumber) floor * aNumber!
Item was changed:
----- Method: Number>>roundUpTo: (in category 'truncation and round off') -----
roundUpTo: aNumber
"Answer the next multiple of aNumber toward infinity that is nearest the
receiver."
+ "Examples:
+ 3.1479 roundUpTo: 0.01 -> 3.15
+ 3.1479 roundUpTo: 0.1 -> 3.2
+ 1923 roundUpTo: 10 -> 1930
+ 3.1479 roundUpTo: 0.005 -> 3.15
+ -3.1479 roundUpTo: 0.01 -> -3.14"
^(self/aNumber) ceiling * aNumber!
Item was changed:
----- Method: Number>>truncateTo: (in category 'truncation and round off') -----
truncateTo: aNumber
"Answer the next multiple of aNumber toward zero that is nearest the
receiver."
+ "Examples:
+ 3.1479 truncateTo: 0.01 -> 3.14
+ 3.1479 truncateTo: 0.1 -> 3.1
+ 1923 truncateTo: 10 -> 1920
+ 3.1479 truncateTo: 0.005 -> 3.145
+ -3.1479 truncateTo: 0.01 -> -3.14"
^(self quo: aNumber)
* aNumber!
More information about the Squeak-dev
mailing list
|