static int scaleInt(double i, double d) { ret iround(i*d); }