Replacing roundf() with round() from thmath.h.

Improves 64 bit compatibility. See http://stackoverflow.com/questions/7694948/cgfloat-round-floor-abs-and-32-64-bit-precision