I need a PHP function that will take a float and round it down to the nearest half (x.0 or x.5). I found other functions that will round to the nearest fraction, but they round both ways.
The function I need can only round down.
Examples
7.778 -> 7.5
7.501 -> 7.5
7.49 -> 7.0
7.1 -> 7.0