Flash isn't giving me real values when using sine, cosine, ect. In basic you use # on variables, and I tired Math.abs( ), but didnt help. Any idea.why(?)
Rothrock - 30 Apr 2005 20:57 GMT
badmonkey91 - 30 Apr 2005 22:07 GMT
er... I mean, when I do Math.cos(ANGLE) It returns some seemingly random number, that isnt the Cosine of the angle
Rothrock - 30 Apr 2005 22:39 GMT
Ah, that makes sense now.
Yes in Flash you don't give Math.cos an angle you need to give it radians.
Define a variable (or a global variable depending on exactly what you are
doing).
toRadians=Math.PI/180
Then you can use
myCos=Math.cos(angle*toRadians);
Rothrock - 30 Apr 2005 22:40 GMT
I meant to say you don't give it an angle in degrees.
badmonkey91 - 30 Apr 2005 22:51 GMT