static int roundToInt(double d) { ret (int) Math.round(d); }