In C++, use roundto(). That's a Zorro function.