Icon Trunc

Unit: WebCore

Available In: Client and Server Applications

function Trunc(Value: Double): Integer

function Trunc(Value: Integer): Integer

The Trunc function returns the closest (towards 0) integer from the value of the input parameter. The return value is an Integer.

Examples

X := Trunc(-10.4);  // X is -10
X := Trunc(15.98);  // X is 15
Image