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 2007-06-17 15:59 ID:JRFp/3Pt

>>80
How would that help? Lambda calculus isn't Touring-complete...

Name: Anonymous 2007-06-17 16:16 ID:xZmPCb0K

what was extremely weird was all the people coming out of the woodwork to defend the OP...

Name: Anonymous 2009-01-14 12:49

LISP

Name: Anonymous 2009-01-14 12:50

SUPER GAY, THE CRIME-FIGHTING HOMOSeXUAL TO THE RESCUE

Name: Anonymous 2009-03-06 13:15

The EXECUTABLE THE ANTIVIRUS SAYS ITS A   shame it has   made sure there   are many ways   to fit in   a datagram The.

Name: Anonymous 2010-06-27 12:57

ur gay

Name: Anonymous 2010-06-27 13:52

my homework is to read the first chapter of SICP: Can someone do that for me please so I don't have to??

Name: Anonymous 2010-08-13 18:42

hallo
that
im
i
vb
vb
i

Name: Anonymous 2010-08-13 18:43

hallo[sic]
that[sic]
im[sic]
i[sic]
vb[sic]
vb[sic]
i[sic]

Name: ​​​​​​​​​​ 2010-10-24 3:46

Name: Sgt.Kabuꐋ袁kiman㷛钦 2012-05-28 20:24

Bringing /prog/ back to its people

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