Next: , Previous: Number-comparing, Up: Number


1.119.6 Number: converting

asFloat
Convert the receiver to an arbitrary subclass of Float


asFloatD
This method's functionality should be implemented by subclasses of Number


asFloatE
This method's functionality should be implemented by subclasses of Number


asFloatQ
This method's functionality should be implemented by subclasses of Number


asNumber
Answer the receiver, since it is already a number


asRectangle
Answer an empty rectangle whose origin is (self asPoint)


asScaledDecimal: n
Answer the receiver, converted to a ScaledDecimal object.


asScaledDecimal: denDigits radix: base scale: n
Answer the receiver, divided by base^denDigits and converted to a ScaledDecimal object.


coerce: aNumber
Answer aNumber, converted to an integer or floating-point number.


degreesToRadians
Convert the receiver to radians


generality
Answer the receiver's generality


radiansToDegrees
Convert the receiver from radians to degrees


unity
Coerce 1 to the receiver's class. The default implementation works, but is inefficient


zero
Coerce 0 to the receiver's class. The default implementation works, but is inefficient