Name

float::trunc — round to integer, towards zero

Synopsis

FLOAT float::trunc ( f FLOAT );
 

Parameters

f FLOAT

Return

FLOAT

Description

Returns f rounded to the nearest integer, towards zero.

Usage

  trunc (+1.6) -> +1.0
 

  trunc (-1.6) -> -1.0