Click here to Skip to main content
15,896,497 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: VC6 to VC8 Pin
sheetal_065-Feb-07 16:47
sheetal_065-Feb-07 16:47 
Questiondata base connectivity Pin
Naveed Akram4-Feb-07 19:59
Naveed Akram4-Feb-07 19:59 
QuestionRe: data base connectivity Pin
David Crow5-Feb-07 4:57
David Crow5-Feb-07 4:57 
Questionhow can i calculate an angle between pointer of a clock by any time? Pin
Yanshof4-Feb-07 19:40
Yanshof4-Feb-07 19:40 
AnswerRe: how can i calculate an angle between pointer of a clock by any time? Pin
Christian Graus4-Feb-07 19:56
protectorChristian Graus4-Feb-07 19:56 
GeneralRe: how can i calculate an angle between pointer of a clock by any time? Pin
Mark Salsbery5-Feb-07 7:32
Mark Salsbery5-Feb-07 7:32 
GeneralRe: how can i calculate an angle between pointer of a clock by any time? Pin
Christian Graus5-Feb-07 8:54
protectorChristian Graus5-Feb-07 8:54 
AnswerRe: how can i calculate an angle between pointer of a clock by any time? Pin
Stephen Hewitt4-Feb-07 20:19
Stephen Hewitt4-Feb-07 20:19 
No need for trig. First we'll just consider the hour hand. On a clock 12 hours is 360 degrees. So the angle of the hour hand (Ah) is given by the following formula (h is the hours):
Ah = 360.0*h/12.0
This formula assumes that Ah can be fractional so 1:30 would be represented as 1.5.

Now we’ll work in the minute hand (m is minutes). On a clock 60 minutes is 360 degrees, So the angle of the minute hand (Am) is given by the following formula:
Am = 360.0*m/60.0

Now we’ll put this together. First assume that we feed in the hours as an integer since the fraction part can be calculated from the minutes. In this case we should adjust h as follows:
h = h+m/60.0

After this we just use the above two formulas. I’ll leave the rest to you. There are some gotchas.


Steve

GeneralRe: how can i calculate an angle between pointer of a clock by any time? Pin
kasturi_haribabu4-Feb-07 21:12
kasturi_haribabu4-Feb-07 21:12 
QuestionLoging System Time & Date Error Pin
Suresh H4-Feb-07 19:38
Suresh H4-Feb-07 19:38 
AnswerRe: Loging System Time & Date Error Pin
Naveen4-Feb-07 20:30
Naveen4-Feb-07 20:30 
GeneralRe: Loging System Time & Date Error Pin
Suresh H4-Feb-07 21:28
Suresh H4-Feb-07 21:28 
QuestionRe: Loging System Time & Date Error Pin
David Crow5-Feb-07 5:08
David Crow5-Feb-07 5:08 
AnswerRe: Loging System Time & Date Error Pin
Naveen5-Feb-07 16:14
Naveen5-Feb-07 16:14 
GeneralRe: Loging System Time & Date Error Pin
David Crow6-Feb-07 3:06
David Crow6-Feb-07 3:06 
AnswerRe: Loging System Time & Date Error Pin
Don Box4-Feb-07 20:39
Don Box4-Feb-07 20:39 
GeneralRe: Loging System Time & Date Error Pin
Suresh H4-Feb-07 21:29
Suresh H4-Feb-07 21:29 
AnswerRe: Loging System Time & Date Error Pin
kasturi_haribabu4-Feb-07 20:59
kasturi_haribabu4-Feb-07 20:59 
GeneralRe: Loging System Time & Date Error Pin
Suresh H4-Feb-07 21:31
Suresh H4-Feb-07 21:31 
QuestionRe: Loging System Time & Date Error Pin
David Crow5-Feb-07 5:08
David Crow5-Feb-07 5:08 
AnswerRe: Loging System Time & Date Error Pin
Suresh H5-Feb-07 18:29
Suresh H5-Feb-07 18:29 
GeneralRe: Loging System Time & Date Error Pin
David Crow6-Feb-07 2:38
David Crow6-Feb-07 2:38 
AnswerRe: Loging System Time & Date Error Pin
Hamid_RT14-Feb-07 6:39
Hamid_RT14-Feb-07 6:39 
Questionexternal user authentication Pin
apoorva_raje4-Feb-07 19:06
apoorva_raje4-Feb-07 19:06 
AnswerRe: external user authentication Pin
Hamid_RT14-Feb-07 6:29
Hamid_RT14-Feb-07 6:29 

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.