Converts a float to closest non-zero int divisible by q.
(f, q)
| 100 | |
| 101 | |
| 102 | def quantize_float(f, q): |
| 103 | """Converts a float to closest non-zero int divisible by q.""" |
| 104 | return int(round(f / q) * q) |
| 105 | |
| 106 | |
| 107 | def adjust_widths_groups_comp(widths, bottle_ratios, groups): |
no outgoing calls
no test coverage detected