bsw@1210: function format.percent_floor(p, q) bsw@1210: if q > 0 then bsw@1210: return math.floor(100 * p / q) .. "%" bsw@1210: else bsw@1210: return "0%" bsw@1210: end bsw@1210: end