math.trunc
This function returns the integer value of input
Syntax
math.trunc(inputNumber)
Arguments
|
Argument |
Type |
Description |
|---|---|---|
|
inputNumber |
number |
The input number |
Returns
|
Type |
Description |
|---|---|
|
number |
The truncated integer value of the input |
Examples
The function math.trunc(3.142) returns 3.0.