Can anyone think of a good way to do this? I'm struggling.

I'm trying to write a function that will round a number to an integer or .5 for example:

3.2342 would round to 3.0

3.3453 would round to 3.5

3.6345 would round to 3.5

3.7666 would round to 4.0

you know what I mean?