Ok, I realize it's early on a Sunday so I hope I'm just missing something obvious:
I have this function:
private decimal CashConversion(decimal amount, decimal ratio)
{
if (ratio == 1) return amount;
decimal convertedAmount = amount / ratio;
return Math.Round(convertedAmount, 2);
}
When I call it like this:
decimal tax = CashConversion(96.53, 15);
The "tax" variable is equal to 6.43. However, 96.53/15 is 6.435333333333333. Rounding that to 2 places should return 6.44. Am I missing something here?