Reset RPG clock orientation: 0:00 bottom, 12:00 top
This commit is contained in:
1 parent
d1732943c2
commit
056a2e63fc
1 file changed
+2
-2
+2
-2
@@ -338,8 +338,8 @@
|
||||
}
|
||||
|
||||
function angleForTime(date) {
|
||||
// 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 - 9 + 24) % 24;
|
||||
// 0:00 = bottom (-90°), 12:00 = top (90°), 24:00 = bottom (-90°)
|
||||
var hours = date.getHours() + date.getMinutes() / 60;
|
||||
return ((hours / 24) * 360 - 90) * Math.PI / 180;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user