Sunday, July 12, 2009

In C++, what's the difference between the floor() and trunc() functions in <Math.h> ?

In C++, what's the difference between the floor() and trunc() functions in %26lt;Math.h%26gt; ?

In C++, what's the difference between the floor() and trunc() functions in %26lt;Math.h%26gt; ?
I don't think theres much of a difference, because floor rounds down to the nearest whole number, while trunc rounds down as well.


No comments:

Post a Comment