Bert Freudenberg uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-wiz.592.mcz
==================== Summary ====================
Name: Kernel-wiz.592 Author: wiz Time: 29 May 2011, 6:40:45.398 pm UUID: ce3c0c86-e4f2-4bf5-8c2a-efbc708af821 Ancestors: Kernel-wiz.591
asNonFraction with updated comments.
ceiling speed up for positive numbers by mirroring floor code rathar than calling floor.
=============== Diff against Kernel-eem.590 ===============
Item was added: + ----- Method: Fraction>>asNonFraction (in category 'converting') ----- + asNonFraction + "Answer a number equivalent to the receiver that is not a fraction." + + + ^self asFloat!
Item was added: + ----- Method: Number>>asNonFraction (in category 'converting') ----- + asNonFraction + "Answer a number equivalent to the receiver that is not a fraction. See Fraction for active method." + + ^self !
Item was changed: ----- Method: Number>>ceiling (in category 'truncation and round off') ----- ceiling + "Answer the integer nearest the receiver toward infinity." - "Answer the integer nearest the receiver toward positive infinity."
+ | truncation | + truncation := self truncated. + self <= 0 ifTrue: [^truncation]. + self = truncation + ifTrue: [^truncation] + ifFalse: [^truncation + 1]! - self <= 0.0 - ifTrue: [^self truncated] - ifFalse: [^self negated floor negated]!
squeak-dev@lists.squeakfoundation.org