The Math Library
3 posters
CMPC :: Computing :: Programming :: General Coding
Page 1 of 1
The Math Library
All programming languages can do some form of mathematics. Usually languages have a library of mathematical functions that is called the "math library". In C++ you need to include the file "cmath"
Such math libraries offer you functions such as these.
Yup that includes trig functions, exponents, logarithms etc. Learn how to use them and you can create a lot of cool and accurate simulations! (assuming you know how to program graphical APIs)
How can math be useful in your programs? Depends on which program you want to create. For a rpg game it is very useful for calculating damage done and damage taken with armor and health and all those other variables in the equation. But for tic tac toe it's pretty useless.
HAVE FUN!
- Code:
#include <cmath>
Such math libraries offer you functions such as these.
Yup that includes trig functions, exponents, logarithms etc. Learn how to use them and you can create a lot of cool and accurate simulations! (assuming you know how to program graphical APIs)
How can math be useful in your programs? Depends on which program you want to create. For a rpg game it is very useful for calculating damage done and damage taken with armor and health and all those other variables in the equation. But for tic tac toe it's pretty useless.
HAVE FUN!
Admin- Pirate King
- Posts : 559
Re: The Math Library
Hey, you know anything about pattern finding? All I could come up with is this, but it's not very good.
...the code is on my laptop, I'll put it on later.
...the code is on my laptop, I'll put it on later.
Corey- Mod
- Posts : 462
Re: The Math Library
I think the math classes are the only reason I'm being forced to learn Calc. -_-
Unchained- Mod
- Posts : 448
CMPC :: Computing :: Programming :: General Coding
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|