C++/Simple Math

Simple C++ Math
Math in C++ is very simple. Keep in mind that C++ mathematical operations follow a particular order much the same as high school math. For example, multiplication and division take precedence over addition and subtraction. The order in which these operations are evaluated can be changed using parentheses.

C++ math library
The C++ math library is actually C's math library. It is easy to use and is accessed by including cmath.

Math functions
Now that we have the C math library let's use some neat functions.

Trigonometry
Note: Trigonometric functions in cmath use RADIANS.