Fix redundant cast to float warning