main fixed f = math.pi // f is now Pi = 3.1415863... print f.round // Prints 3 print f.round down // Prints 3 print f.round up // Prints 4
Conversions between basic types are done automatically in cases where no information is lost. So for example Byte can be directly given to any function taking an int, and Int automatically converts to Fixed. All basic types automatically convert to String.
Fixed numbers can be converted to integer using rounding functions.
main fixed f = math.pi // f is now Pi = 3.1415863... print f.round // Prints 3 print f.round down // Prints 3 print f.round up // Prints 4