roundBy method
Implementation
double roundBy([int base = 0]) {
assert(base >= 0, "The base must be greater than or equal to 0.");
if (base == 0) {
return roundToDouble();
}
final p = pow(10, base);
return (this * p).round() / p;
}
double roundBy([int base = 0]) {
assert(base >= 0, "The base must be greater than or equal to 0.");
if (base == 0) {
return roundToDouble();
}
final p = pow(10, base);
return (this * p).round() / p;
}