don't always cast to float

Signed-off-by: Stephen Gran <stephen.gran@piksel.com>