toFix static method

int toFix(
  1. double val
)

Implementation

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