roundToNearest method

double roundToNearest(
  1. int decimal
)

Implementation

double roundToNearest(int decimal) => (this * decimal).round() / decimal;