double getHeightRatio(double val) { final res = (val / refHeight) * 100; return res * blockSizeVertical; }