Skip to end of metadata
Go to start of metadata

Use the toInteger method to convert a real number value into an integer value:

<result> = <number>.toInteger()

<number>

A value of type real or integer or an expression that evaluates to a value of these types: the value to convert to integer.

<result>

An integer: the number as an integer, truncated to 0 decimals without rounding. When number was already of type integer, the method returns it unchanged.



Related articles