Is there a reason you are casting to float?