Re: DT in BGT
Just out of curiosity and as a further effort to troubleshoot this, I created a totally separate tiny program with only the code for theta to see whether BGT would get it correct. Code is:
double theta;
double deg = 253;
const double pi = 3.14159265358979;
void main()
{
show_game_window("");
DTR(deg);
alert("", "Number of degrees is " + deg + ". Theta is " + theta + ". Cosine of theta is " + cosine(theta) + ". Sine of theta is " + sine(theta) + ".");
}
double DTR(double deg)
{
return theta = deg*pi/180;
}
It seems to work now. This is what it shows:
Number of degrees is 253. Theta is 4.41568300754565. Cosine of theta is -0.292371704722741. Sine of theta is -0.956304755963034.
That is correct. If I change the number of degrees to, say, 75, I get:
Number of degrees is 75. Theta is 1.30899693899575. Cosine of theta is 0.258819045102522. Sine of theta is 0.965925826289068.
I double checked with a calculator, and those are both correct. So why doesn't it work in my other code?
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector