toInt static method

int toInt(
  1. double x
)

Implementation

static int toInt(double x) => x > 0 ? x.floor() : x.ceil();