How to round down a float to the nearest value that can be divided by two without rest? <p>For example I have a float 55.2f and want to round it down such that the result can be divided by two without rest.</p> <p>So 55.2 would become 54 as that is the nearest smaller "step" that can be divided by two. Is there a function for this or must I write my own algorithm?</p>