round static method

double round(
  1. double value,
  2. int decimals
)

Rounds the give double value to the given decimals.

Implementation

static double round(double value, int decimals) =>
    (value * pow(10, decimals)).round() / pow(10, decimals);