I'm using this code to calculate the area of a triangle, with the values 2, 2 and 1. When I do the calculation in my pocket calculator I get 0.97, but in C# it's 0. I guess it has something to do about the rounding of the decimals, but I have changed the last value from i and up, but still get 0 as the result! What am I doing wrong? Help preciated! Thanks!
double i = (valueA + valueB + valueC) / 2;
return Math.Round(Math.Sqrt(i * (i - valueA) * (i - valueB) * (i - valueC)),1);