Skip to content

Commit 769f166

Browse files
accurate calculation
1 parent 4fc2d29 commit 769f166

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

02 - JS + CSS Clock/index-FINISHED.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
minsHand.style.transform = `rotate(${minsDegrees}deg)`;
8686

8787
const hour = now.getHours();
88-
const hourDegrees = ((hour / 12) * 360) + 90 + 12 * (minsDegrees - 90) / 60;
88+
const hourDegrees = ((hour / 12) * 360) + 90 + (minsDegrees - 90) / 12;
8989
hourHand.style.transform = `rotate(${hourDegrees}deg)`;
9090
}
9191

0 commit comments

Comments
 (0)