Mwnci trunc() Function

Syntax

trunc(number)

Description

The trunc() function returns returns the truncated integer part of a number.
This function will NOT round the number to the nearest integer, but simply removes the decimals.
A float value of the truncated integer is returned

Example

include("math")
println(trunc(1.234))
println(trunc(1))
println(type(trunc(1.234)))
println(type(trunc(1)))


1
1
float
float