function double round (double value, long diga, long mode)
This rounds a given value to a specified number of decimal places.
double value The value to be rounded.
long diga The number of decimal places to which value is to be rounded.
long mode 0 truncate (for example, both 1.5 and 1.49 are rounded down to 1)
1 normal round (for example, 1.5 is rounded up to 2; 1.49 is rounded
down to 1)
2 round up (for example, both 1.5 and 1.49 are rounded up to 2)