static IntRange doubleToIntRange(double factor, DoubleRange r) { ret r == null ? null : intRange(iround(r.start*factor), iround(r.end*factor)); }