Use some floating point for smoother results

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>