Click here to Skip to main content
15,891,423 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Math (statistics) problem that I just can't seem to get a grasp on Pin
Rob Graham4-Apr-07 4:19
Rob Graham4-Apr-07 4:19 
GeneralRe: Math (statistics) problem that I just can't seem to get a grasp on [modified] Pin
cp98764-Apr-07 17:59
cp98764-Apr-07 17:59 
GeneralRe: Math (statistics) problem that I just can't seem to get a grasp on Pin
Rob Graham5-Apr-07 13:22
Rob Graham5-Apr-07 13:22 
GeneralRe: Math (statistics) problem that I just can't seem to get a grasp on Pin
cp98765-Apr-07 16:07
cp98765-Apr-07 16:07 
AnswerRe: Math (statistics) problem that I just can't seem to get a grasp on Pin
Frank Kerrigan2-May-07 6:33
Frank Kerrigan2-May-07 6:33 
QuestionAngle Algorithm Pin
Kushi Bobby4-Apr-07 1:23
Kushi Bobby4-Apr-07 1:23 
AnswerRe: Angle Algorithm Pin
CPallini4-Apr-07 1:46
mveCPallini4-Apr-07 1:46 
GeneralRe: Angle Algorithm Pin
cp98764-Apr-07 2:06
cp98764-Apr-07 2:06 
CPallini wrote:
degrees = (hour % 12) * 30 - minutes * 6;

where '%' is the reminder of the integer division.


The hour hand does not jump in 30 degree steps, you need to work out the location of the hour hand as it moves steadily from (hour % 12) * 30 to ((hour+1) % 12) * 30 and then subtract the minutes angle. The minutes angle (minutes * 6) looks OK unless you have to take seconds into account - then it is the same issue.


Peter

"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."

GeneralRe: Angle Algorithm Pin
Dan Neely4-Apr-07 2:11
Dan Neely4-Apr-07 2:11 
GeneralRe: Angle Algorithm Pin
CPallini4-Apr-07 4:04
mveCPallini4-Apr-07 4:04 
GeneralRe: Angle Algorithm Pin
cp98764-Apr-07 18:09
cp98764-Apr-07 18:09 
GeneralRe: Angle Algorithm Pin
CPallini4-Apr-07 21:05
mveCPallini4-Apr-07 21:05 
GeneralRe: Angle Algorithm Pin
cp98764-Apr-07 21:53
cp98764-Apr-07 21:53 
QuestionColor generation algorithm Pin
roel_v3-Apr-07 22:20
roel_v3-Apr-07 22:20 
AnswerRe: Color generation algorithm Pin
Nathan Addy6-Apr-07 1:45
Nathan Addy6-Apr-07 1:45 
GeneralRe: Color generation algorithm Pin
roel_v7-Apr-07 6:56
roel_v7-Apr-07 6:56 
QuestionReading text file problem with casting to double Pin
kelvinic3-Apr-07 18:28
kelvinic3-Apr-07 18:28 
AnswerRe: Reading text file problem with casting to double Pin
cp98763-Apr-07 18:58
cp98763-Apr-07 18:58 
AnswerRe: Reading text file problem with casting to double Pin
cjengler4-Apr-07 2:09
cjengler4-Apr-07 2:09 
GeneralRe: Reading text file problem with casting to double Pin
kelvinic4-Apr-07 2:17
kelvinic4-Apr-07 2:17 
GeneralRe: Reading text file problem with casting to double Pin
cjengler4-Apr-07 2:36
cjengler4-Apr-07 2:36 
QuestionPermutations of an election result Pin
Colin Angus Mackay31-Mar-07 10:32
Colin Angus Mackay31-Mar-07 10:32 
AnswerRe: Permutations of an election result Pin
Luc Pattyn31-Mar-07 11:05
sitebuilderLuc Pattyn31-Mar-07 11:05 
GeneralRe: Permutations of an election result Pin
Colin Angus Mackay31-Mar-07 11:27
Colin Angus Mackay31-Mar-07 11:27 
GeneralRe: Permutations of an election result Pin
Luc Pattyn31-Mar-07 11:47
sitebuilderLuc Pattyn31-Mar-07 11:47 

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.