toFix static method

int toFix(
  1. double val
)

Implementation

static int toFix(double val) {
  const fixedPoint = 20;
  const one = 1 << fixedPoint;
  return (val * one).toInt() & 0xffffffff;
}