Use xbacklight to increase or decrease brightness when the user uses the mouse wheel over the brightness widget.
To display a nice percentage-based brightness, round it to int in all circumstances.