BloombergLP::bdldfp::DecimalImpUtil::round

Return x rounded to the specified precision.

Synopsis

Declared in <bdldfp_decimalimputil.h>

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

Return Value

x rounded to the specified precision

Parameters

NameDescription
xvalue to round
precisionnumber of digits after the decimal point