isInteger static method

dynamic isInteger(
  1. double a
)

double是否为整数

Implementation

static isInteger(double a) {
  double b = a;
  int b1 = a.toInt();
  return b % b1 == 0;
}