cmath is filled with useful math functions. *gasp* what a surprise! Anyways, here's a nice place to look them all up. As for your question, the "floor" function is what you'd want.

http://www.cplusplus.com/ref/cmath/index.html

~SK