[squeak-dev] The Inbox: Kernel-mt.1410.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Aug 27 06:01:04 UTC 2021


A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-mt.1410.mcz

==================== Summary ====================

Name: Kernel-mt.1410
Author: mt
Time: 27 August 2021, 8:01:02.129421 am
UUID: bfb40b87-1a6b-0e47-a620-5d8b4de5ca04
Ancestors: Kernel-mt.1409

Adds missing changes in #roundUpTo:.

=============== Diff against Kernel-mt.1409 ===============

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"
  
+ 	^ aNumber isInteger
+ 		ifTrue: [self roundUpToInteger: aNumber]
+ 		ifFalse: [(self/aNumber) ceiling * aNumber]!
- 	^(self/aNumber) ceiling * aNumber!



More information about the Squeak-dev mailing list