BloombergLP::bdldfp::DecimalUtil::trunc

Same as the overload taking Decimal64.

Synopsis

Declared in <bdldfp_decimalutil.h>

static
Decimal128
trunc(
    Decimal128 x,
    unsigned int precision);

Return Value

x truncated to the specified number of decimal places

Parameters

NameDescription
xvalue to truncate
precisionnumber of decimal places to retain