Discussion
Commonwealth Bank of Australia
Commonwealth Bank of Australia
AU
Commonwealth Bank of Australia
Posted: Jun 12, 2018
Last activity: Sep 12, 2023
Last activity: 12 Sep 2023 21:40 EDT
Function to round off the value of decimal property to certain precision point
This can be achieved through the custom java function.
Java Code:
long factor = (long) Math.pow(10, PrecisionSize);
Value = Value * factor;
long tmp = Math.round(Value);
return (double) tmp / factor;
Value and PrecisionSize are the parameters for this function.