Pretty basic question I think - I\'m performing this function:
private double convertMetersToFeet(double meters)
{
//function converts Feet to Meters.
If it is not for printing you should not care about the error. 337.36080000000004 is just as correct as 337.3608 since you only have 5 significant digits in the factor and only 3 in the test input. (And I certainly hope that the answer your method gave was 331 and not 337)
However, this line fetched from another question seems to do the trick as well.
double toFeet = ((int)(meters*3.2808*10000))/10000.0;
The only problem is that is overflows a lot faster.