I am trying to use Decimal.Round to round a decimal value to 0 decimal precision. It's giving me different results for different decimal values. |
Graphite’s Decimal.Round system function uses Math.Round function of .net framework that has default rounding to nearest even (banker’s rounding). If you are looking to round the decimal (D) with fractional component >= 0.5 to D + 1 and <0.5 to D -1, then here is the possible solution: Create a behavior with the following logic –
You can run this behavior from places where you expect to see the above results. Hope this helps. |