| << Prev | Beej's Guide to C | Next >> |
It's your favorite subject: Mathematics! Hello, I'm Doctor Math, and I'll be making math FUN and EASY!
[vomiting sounds]
Ok, I know math isn't the grandest thing for some of you out there, but these are merely functions that quickly and easily do math you either know, want, or just don't care about. That pretty much covers it.
For you trig fans out there, we've got all manner of things, including sine, cosine, tangent, and, conversely, arc sine, arc cosine, and arc tangent. That's very exciting.
And for normal people, there is a slurry of your run-of-the-mill functions that will serve your general purpose mathematical needs, including absolute value, hypotenuse length, square root, cube root, and power.
In short, you're a fricking MATHEMATICAL GOD!
Oh wait, before then, I should tell you that the trig functions have
three variants with different suffixes. The "f" suffix (e.g.
sinf()) returns a
Also, there are several values that are defined in the math.h header file.
e
log_2 e
log_10 e
log_e 2
log_e 10
pi
pi/2
pi/4
1/pi
2/pi
2/sqrt(pi)
sqrt(2)
1/sqrt(2)
| << Prev | Beej's Guide to C | Next >> |