13) #include <cmath>¶
I like these smaller segments. They distract us from the much bigger, much more intimidating sections such as Conditionals.
| So just like how we included the
<iostream>, <iomanip>, and <string> libraries, here’s another. But as of now we only studied one function of it. This library is called the <cmath> library, and it’s imported by typing#include <cmath>
It only gets used for a few commands, depending on your use case, such as
pow(a, b), sin(a), cos(a), tan(a), log(a).There’s also more uses to it, it’s an entire library after all, but this is what we’ve used it for thus far. You can look up the library to see more functions of it.