Hmm... not very well then. cos(90) according to your parser is like -.447.... when the answer is actually 0. Same with sin.Originally Posted by jverkoey
This is a discussion on Math Parser thingy.....it's kinda cool within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Originally Posted by jverkoey It handles trig functions and exponents, it always has. Hmm... not very well then. cos(90) according ...
Hmm... not very well then. cos(90) according to your parser is like -.447.... when the answer is actually 0. Same with sin.Originally Posted by jverkoey
Radians...
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
Bah... how many people actually want it in radians tho?
So you can use pi, then?
Do you just type in "pi," or what?
Um, I could define pi as a variable I suppose.
Here, I'll put some variables in there that you guys can mess with.
There we go:I have defined a few variables for you to mess around with now: x, y, pi (const at 3.14159265), and array (a 25 value array).
Example: sin(pi) or array[3]=x
Variable values are kept between operations. So if you do array[3]=5 in one statement, the next time you call array[3], it will still be 5, assuming no one else changed it.
x
y
array[25]
pi (const)
Last edited by jverkoey; 06-17-2005 at 01:58 PM.