chop

Syntax

double chop(double number)

Arguments

number
Any double or float number.

Return

The truncated value.

Description

Returns the value of number truncated, towards 0.0, to an integral value.

Example

%ffp

OnFilterStart:
{
    Info("Chopping 2.543 towards 0.0 gives %f", chop(2.543));
    Info("Chopping -2.345 towards 0.0 gives %f", chop(-2.345));
}

See Also

ceil, floor, ichop, round, C Runtime Functions