truncate


truncate(r)
      

Return the integer closest to the real number r towards zero.

Examples:


truncate(1.2)
// 1.
truncate(2/3)
// 0
      

Also see:

floor
ceiling
abs


Core Module Index | Contents