round static method

double round(
  1. double d,
  2. int r
)

Implementation

static double round(double d, int r) {
  String s = d.toStringAsFixed(r);
  return double.parse(s);
}