Math.Round not rounding double [closed]
Closed 47 mins ago.
c# math.round not rounding double
I have a problem with the function math.round, it does not rounding sometimes.
For example:
double a = 5 / 1.2; // = 4,1666666666666666666666666666667
Math.Round(a, 2) return 4,1666666666666666666666666666667 instead of 4.16.
has anyone encountered this problem before?