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