CMPC
Would you like to react to this message? Create an account in a few clicks or log in to continue.

The Math Library

3 posters

Go down

The Math Library Empty The Math Library

Post by Admin Fri Jan 01, 2010 4:15 pm

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"

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
Admin
Pirate King

Posts : 559

Back to top Go down

The Math Library Empty Re: The Math Library

Post by Corey Fri Jan 01, 2010 6:39 pm

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.
Corey
Corey
Mod

Posts : 462

Back to top Go down

The Math Library Empty Re: The Math Library

Post by Unchained Sat Jan 02, 2010 8:12 am

I think the math classes are the only reason I'm being forced to learn Calc. -_-
Unchained
Unchained
Mod

Posts : 448

Back to top Go down

The Math Library Empty Re: The Math Library

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum