github is breaking my comment :(
It should say:
```
qBound<qreal>(0.0, (qreal)value / total, 1.0);
```