Making it a lot more complicated than it needs to be:

num = round(num*2,0)/2

enjoy!