fix clang warnings:
"unused var old"
"implicit conversion from 'float' to 'int' changes value from 1.39 to 1"