📜  在颤振中四舍五入 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:07.293000             🧑  作者: Mango

代码示例3
import 'dart:math';

double roundDouble(double val, int places){
  num mod = pow(10.0, places);
  return ((val * mod).round().toDouble() / mod);
}