ExCellerate.Functions.Math.Trunc (excellerate v0.4.0)

Copy Markdown View Source

Truncates a number toward zero, removing any fractional part.

Unlike floor or ceil, trunc always drops the decimal portion regardless of sign.

Examples

trunc(3.7)   3
trunc(-3.7)  -3
trunc(5)     5