Rotate RPG clock 90deg counter-clockwise (9:00 at bottom)

This commit is contained in:
Richard Zink committed 2026-10-07 07:53:11 +02:00
1 parent 79ceaa1673
commit d1732943c2
1 file changed
+2 -2
+2 -2
View File
@@ -338,8 +338,8 @@
} }
function angleForTime(date) { function angleForTime(date) {
// Rotate so 6:00 real = bottom (0°), 12:00 = right (90°), 18:00 = top (180°), 0:00 = left (270°) // Rotate so 9:00 real = bottom (0°), 15:00 = right (90°), 21:00 = top (180°), 3:00 = left (270°)
var hours = (date.getHours() + date.getMinutes() / 60 - 6 + 24) % 24; var hours = (date.getHours() + date.getMinutes() / 60 - 9 + 24) % 24;
return ((hours / 24) * 360 - 90) * Math.PI / 180; return ((hours / 24) * 360 - 90) * Math.PI / 180;
} }