static int toIntPercent(double ratio) { ret roundToInt(ratio*100); } // when used with map function static int toIntPercent(float ratio) { ret toIntPercent((double) ratio); }