Welcome to the Creatures Wiki! Log in and join the community.


From Creatures Wiki
Jump to navigation Jump to search

ITOF is a CAOS command which casts to floating point.


Syntax: ITOF I (integer)

This returns a float made from integer I. Note that CEE automatically casts to the appropriate type, so the only real use for ITOF is for things like forcing floating point division (DIVV).

Contrary to expectations, passing a float to ITOF will return the float, rather than rounding it. (Perhaps CEE internally thinks of I as a float.)


lc2e command line:

> outv itof 2
> outv itof 2.5

See also[edit]