I am getting invalid value when performing this Math.Round(0.575, 2, MidpointRounding.AwayFromZero)
trying to do midpoint rounding up?
Input: Math.Round(0.575, 2, MidpointRounding.AwayFromZero)
Expected: 0.58 but getting 0.57
Input: Math.Round(-0.575, 2, MidpointRounding.AwayFromZero)
Expected: -0.58 but getting -0.57
Input: Math.Round(-0.865, 2, MidpointRounding.AwayFromZero)
Expected: -0.87 and the output matches the expected result as -0.87
Here is the quick fiddle to try https://dotnetfiddle.net/KdR8pN