Click here to Skip to main content
15,914,608 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: comparing two double values Pin
KASR111-Oct-07 21:44
KASR111-Oct-07 21:44 
GeneralRe: comparing two double values Pin
chandu00411-Oct-07 21:45
chandu00411-Oct-07 21:45 
GeneralRe: comparing two double values Pin
David Crow12-Oct-07 3:02
David Crow12-Oct-07 3:02 
GeneralJust curiosity Pin
Nelek12-Oct-07 3:53
protectorNelek12-Oct-07 3:53 
GeneralRe: Just curiosity Pin
David Crow12-Oct-07 4:05
David Crow12-Oct-07 4:05 
AnswerRe: comparing two double values Pin
Nibu babu thomas11-Oct-07 21:44
Nibu babu thomas11-Oct-07 21:44 
GeneralRe: comparing two double values Pin
David Crow12-Oct-07 3:19
David Crow12-Oct-07 3:19 
AnswerRe: comparing two double values Pin
Nelek12-Oct-07 1:03
protectorNelek12-Oct-07 1:03 
I made this function to use it in my project before doing updates from edits or labels

double CutAndRoundNumberToNDecimals (double dValue, const int nDec)
{	double dTemp = 0, dFract = 0, dInt = 0, dRes = 0;
	//Operations to round up the nth decimal number when necessary
	dTemp = dValue*pow(10,nDec);
	dFract = modf (dTemp, &dInt);
	if (dFract >= 0.5)
		dInt++;
	dRes = dInt/pow(10,nDec);

	return dRes;
}


Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

Help me to understand what I'm saying, and I'll explain it better to you

Wink | ;)

QuestionSearchin hex arry Pin
aamir ali11-Oct-07 21:10
aamir ali11-Oct-07 21:10 
AnswerRe: please help Pin
chandu00411-Oct-07 21:22
chandu00411-Oct-07 21:22 
QuestionRe: please help Pin
CPallini11-Oct-07 22:07
mveCPallini11-Oct-07 22:07 
AnswerRe: Searchin hex arry Pin
jhwurmbach11-Oct-07 23:22
jhwurmbach11-Oct-07 23:22 
AnswerRe: Searching hex array Pin
chandu00412-Oct-07 0:57
chandu00412-Oct-07 0:57 
QuestionFlow is not passing in a worker thread Pin
neha.agarwal2711-Oct-07 21:08
neha.agarwal2711-Oct-07 21:08 
AnswerRe: Flow is not passing in a worker thread Pin
Karismatic11-Oct-07 21:29
Karismatic11-Oct-07 21:29 
AnswerRe: Flow is not passing in a worker thread Pin
chandu00411-Oct-07 21:41
chandu00411-Oct-07 21:41 
GeneralRe: Flow is not passing in a worker thread Pin
neha.agarwal2711-Oct-07 21:45
neha.agarwal2711-Oct-07 21:45 
GeneralRe: Flow is not passing in a worker thread Pin
chandu00411-Oct-07 21:59
chandu00411-Oct-07 21:59 
GeneralRe: Flow is not passing in a worker thread Pin
neha.agarwal2711-Oct-07 23:11
neha.agarwal2711-Oct-07 23:11 
GeneralRe: Flow is not passing in a worker thread Pin
chandu00411-Oct-07 23:24
chandu00411-Oct-07 23:24 
GeneralRe: Flow is not passing in a worker thread Pin
chandu00412-Oct-07 3:15
chandu00412-Oct-07 3:15 
GeneralRe: Flow is not passing in a worker thread Pin
neha.agarwal2712-Oct-07 18:15
neha.agarwal2712-Oct-07 18:15 
QuestionHow to support 128 dpi and 192 dpi as well? Pin
ttarantula11-Oct-07 20:52
ttarantula11-Oct-07 20:52 
AnswerRe: How to support 128 dpi and 192 dpi as well? Pin
jhwurmbach11-Oct-07 23:27
jhwurmbach11-Oct-07 23:27 
GeneralRe: How to support 128 dpi and 192 dpi as well? [modified] Pin
ttarantula11-Oct-07 23:44
ttarantula11-Oct-07 23:44 

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.