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