Pretty basic question I think - I\'m performing this function:
private double convertMetersToFeet(double meters)
{
//function converts Feet to Meters.
I'm answering my own question for posterity's sake. I used the DecimalFormat answer above, but the answers failed to take into account the return type of the method.
Here's the finished code:
private double convertMetersToFeet(double meters)
{
//function converts Feet to Meters.
double toFeet = meters;
toFeet = meters*3.2808; // official conversion rate of Meters to Feet
String formattedNumber = new DecimalFormat("0.0000").format(toFeet); //return with 4 decimal places
double d = Double.valueOf(formattedNumber.trim()).doubleValue();
return d;
}