In my effort to create a watch face...
I went online and found a circle graph with both deg and rad: http://math.rice.edu/~pcmi/sphere/degrad.gif
Then I created a multi-dimensional array that maps clock hour positions to a rads value like this:
hidden var hourRads = [
//make a zero-element pad to align the indicies
//with a one-based clock numbering scheme
[0, 0],
//the clock begins...
[1, 5*PI/3], [2, 11*PI/6], [3, 0],
[4, PI/6], [5, PI/3], [6, PI/2],
[7, 2*PI/3], [8, 5*PI/6], [9, PI],
[10, 7*PI/6], [11, 4*PI/3], [12, 3*PI/2]
];
The only problem I had with this approach is the fact that the values for rads depicted in the image link above (and all others like it that I found) did not work initially. I had to take the image and flip it 180 degrees on the x-axis to get the proper values for my table.
For example, take a look at the one o'clock mapping above ( [1, 5*PI/3] ). In the graph, 5*PI/3 actually sits at the five o'clock position.
Can anyone explain this? I cannot understand why I had to flip the values to get what I need, considering the fact that both the Garmin scheme and the graph have 0 degrees at the three o'clock position and increasing in value as we move counter-clockwise.
Thanks,
Jeff