truncate function

num truncate(
  1. num x
)

Rounds the given value x to an integer towards zero.

Implementation

num truncate(num x) => x.truncate();