dos_trunc - dalefugier/DOSLib GitHub Wiki
Truncates a number to a specified number of decimal places.
Syntax
(dos_trunc number [precision])
Parameters
number
The number.
precision
The precision of the truncation. The default value precision is 0 (zero).
Returns
The truncated number, if successful.
nil on error.
Example
Command: (dos_trunc (dos_pi))
3
Command: (dos_trunc (dos_pi) 1)
3.1
Command: (dos_trunc (dos_pi) 2)
3.14
Command: (dos_trunc (dos_pi) 3)
3.141