Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

sin() and cos()... wtf? (c++)

Name: Anonymous 2006-09-04 0:32

Check this out:

double direction, length, result1, result2;
out << "direction?\n";
cin >> direction;
result1 = cos(direction);
result2 = sin(direction);
cout << result1 << "\n";
cout << result2 << "\n";
This code is fucked up, because when I enter 45, it should return the same value (.70786 or something similar).  Instead, I get:

0.525322 (cos)
0.850904 (sin)

It's almost like the C++ library is fucked up or something.  I know I haven't forgotten basic geometry (windows calculator bears this out) and I don't think I'm going insane, so WHAT AM I DOING WRONG?

Name: Anonymous 2006-09-06 2:44

>>31
I went to one of THE top-rated public schools in America (based on amount of AP and higher level classes offered) and I didn't learn any of this shit. I got straight A's but had to stop right before AP Calculus because of bullshit caused by a school I moved from. However, the people who did take that AP class said it was one of the easiest they took, and that they didn't learn SHIT. And I know why : every single school I've been to, rural, urban, middle of nowhere, middle of downtown, have always been WAY too fucking crowded. Because of the education funding cuts in the last few years, undertrained teachers are left to teach VERY crowded classes, with half of the teachers not even having their own rooms in some cases, and as a result, everyone suffers. Many schools do NOT effectively teach higher level math classes, and as such many students do not learn concepts fundamental to others' understanding of math.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List