BloombergLP::bdldfp::DecimalUtil::round

Same as the related overload above for round.

Synopsis

Declared in <bdldfp_decimalutil.h>

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

Return Value

x rounded to the specified number of decimal places

Parameters

NameDescription
xvalue to round
precisionnumber of decimal places to round to