Formats a double to a fixed number of decimal places.
double toFixed(int fractionDigits) { return double.parse(toStringAsFixed(fractionDigits)); }