roundTo3Places static method

double roundTo3Places(
  1. double n
)

Implementation

static double roundTo3Places(double n) {
  return (n * 1000).round() * 0.001;
}