hopefully avoid coverity complaining about a float vs int comparison