Number to round.
Fractional digits to keep; values <= 0 round to the nearest integer.
Radix used for scaling (default 10); most callers should leave this unchanged.
value rounded to digits decimal places at the given base; values that already fit within digits are returned unchanged.
Rounds a number to a fixed number of decimal places.
Rounds by the decimal value as written, so
1.005rounds to1.01even though its binary representation is slightly below1.005. Halfway values round away from zero. Whendigits <= 0, rounds to the nearest integer. Thebaseparameter defaults to10; most callers should leave it unchanged.