Click here to Skip to main content
15,915,600 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow do I: Resolve undefined classes when... Pin
CMFC6.0VS.NETUser17-Jul-01 7:54
CMFC6.0VS.NETUser17-Jul-01 7:54 
AnswerRe: How do I: Resolve undefined classes when... Pin
Chris Losinger17-Jul-01 8:06
professionalChris Losinger17-Jul-01 8:06 
GeneralRe: How do I: Resolve undefined classes when... Pin
17-Jul-01 9:48
suss17-Jul-01 9:48 
AnswerRe: How do I: Resolve undefined classes when... Pin
CMFC6.0VS.NETUser17-Jul-01 9:27
CMFC6.0VS.NETUser17-Jul-01 9:27 
Generalsocket question Pin
Steven Edison17-Jul-01 7:11
Steven Edison17-Jul-01 7:11 
Generalchtmlview question Pin
17-Jul-01 5:55
suss17-Jul-01 5:55 
GeneralRe: chtmlview question Pin
17-Jul-01 7:35
suss17-Jul-01 7:35 
GeneralCosine Rounding Problem Pin
AndyC17-Jul-01 5:44
AndyC17-Jul-01 5:44 
Has anybody else had this problem and if so how do you get round it.

I have the following piece of code

#ifndef Pi
#define Pi 3.1415926535897932384626433832795
#endif

#ifndef DEGS_TO_RADS
#define DEGS_TO_RADS (Pi/180.0)
#endif

double dCosine, dRotationAngle;
dCosine = cos(dRotationAngle * DEGS_TO_RADS);

In one perticular place the rotation angle is 90 degrees, and as I am sure you are aware the cosine of 90 degrees is 0. But in the above code the resulkt from the cos function is a very small number, 6.1230317691119e-017, but but this still is not zero.

Any Ideas

Cheers
AndyCConfused | :confused:
GeneralRe: Cosine Rounding Problem Pin
Tomasz Sowinski17-Jul-01 5:57
Tomasz Sowinski17-Jul-01 5:57 
GeneralRe: Cosine Rounding Problem Pin
Paolo Messina17-Jul-01 10:51
professionalPaolo Messina17-Jul-01 10:51 
GeneralRegistry Question Pin
Fady Elias17-Jul-01 5:33
Fady Elias17-Jul-01 5:33 
GeneralRe: Registry Question Pin
Ollie17-Jul-01 6:08
Ollie17-Jul-01 6:08 
GeneralRe: Registry Question Pin
17-Jul-01 7:38
suss17-Jul-01 7:38 
GeneralRe: Registry Question Pin
Fady Elias17-Jul-01 7:47
Fady Elias17-Jul-01 7:47 
GeneralAbstract class members assistance Pin
Chris Meech17-Jul-01 5:11
Chris Meech17-Jul-01 5:11 
GeneralRe: Abstract class members assistance Pin
Tomasz Sowinski17-Jul-01 5:21
Tomasz Sowinski17-Jul-01 5:21 
GeneralRe: Abstract class members assistance Pin
Chris Meech17-Jul-01 5:28
Chris Meech17-Jul-01 5:28 
GeneralColumns In List Control Pin
AJ12317-Jul-01 4:21
AJ12317-Jul-01 4:21 
GeneralRe: Columns In List Control Pin
17-Jul-01 4:41
suss17-Jul-01 4:41 
GeneralRe: Columns In List Control Pin
Michael Dunn17-Jul-01 7:06
sitebuilderMichael Dunn17-Jul-01 7:06 
QuestionCImageList and the System ImageList? Pin
17-Jul-01 2:38
suss17-Jul-01 2:38 
AnswerRe: CImageList and the System ImageList? Pin
Tomasz Sowinski17-Jul-01 2:42
Tomasz Sowinski17-Jul-01 2:42 
GeneralRe: CImageList and the System ImageList? Pin
17-Jul-01 4:44
suss17-Jul-01 4:44 
GeneralRe: CImageList and the System ImageList? Pin
Tomasz Sowinski17-Jul-01 4:53
Tomasz Sowinski17-Jul-01 4:53 
GeneralRe: CImageList and the System ImageList? Pin
Michael Dunn17-Jul-01 7:08
sitebuilderMichael Dunn17-Jul-01 7:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.