trunc overloads
Declared in <bdldfp_decimalutil.h>
Same as the related overload above for trunc.
static
Decimal128
trunc(Decimal128 x);
» more...
Return the nearest integral value not greater in magnitude than x.
static
Decimal32
trunc(Decimal32 x);
» more...
Same as the related overload above for trunc.
static
Decimal64
trunc(Decimal64 x);
» more...
Same as the overload taking Decimal64.
static
Decimal128
trunc(
Decimal128 x,
unsigned int precision);
» more...
Return x truncated to the specified number of decimal places.
static
Decimal32
trunc(
Decimal32 x,
unsigned int precision);
» more...
Same as the related overload above for trunc.
static
Decimal64
trunc(
Decimal64 x,
unsigned int precision);
» more...
xx truncated to the specified number of decimal places| Name | Description |
|---|---|
| x | value to truncate toward zero |
| precision | number of decimal places to retain |