Previous: , Up: Number   [Index]


1.122.14 Number: truncation and round off

asInteger

Answer the receiver, rounded to the nearest integer

floor

Return the integer nearest the receiver toward negative infinity.

fractionPart

Answer a number which, summed to the #integerPart of the receiver, gives the receiver itself.

integerPart

Answer the receiver, truncated towards zero

roundTo: aNumber

Answer the receiver, truncated to the nearest multiple of aNumber

rounded

Returns the integer nearest the receiver

truncateTo: aNumber

Answer the receiver, truncated towards zero to a multiple of aNumber

truncated

Answer the receiver, truncated towards zero