Skip to content

Commit c6b7a23

Browse files
committed
Turns out we do not need to use modulo since the resulting degrees corrects itself out
1 parent c8d0a02 commit c6b7a23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979

8080
const hours = now.getHours();
8181
console.log(`hours: ${hours}`);
82-
const hoursDegrees = ((hours % 12)/12 * 360 + 90);
82+
const hoursDegrees = ((hours / 12) * 360 + 90);
8383
hoursHand.style.transform = `rotate(${hoursDegrees}deg)`;
8484

8585
const minutes = now.getMinutes();

0 commit comments

Comments
 (0)