C++ rounding up using which func/library

Which library and class function would I use to round up to the nearest 0.5

ex. 4.34 --> 4.5
5.77 --> 6.0

Came across the ceil() function in cmath, wondering if this would work?