garrynewman/garrysmod — pull request #804 by KrakenZ (2014-09-07 19:53:21+00:00)
Title: Added math.Truncate( num, idp )

**math.Round** rounds to the nearest integer.
**math.Truncate** rounds towards zero.

I needed it for some equations and thought I'd make a pull request for others.
This is practically the same function as math.Round, except it doesn't add 0.5, which makes it not rounds to the nearest integer.

```lua
local num = 54.59874

print( math.Truncate( num, 2 ) ) -- 54.59
print( math.Round( num, 2 ) ) -- 54.6
```