Fix analog clock angle calculations

This commit is contained in:
Kiyomichi Kosaka 2025-06-14 23:56:31 +02:00
parent 9eb4b21986
commit 0bd1957112

View File

@ -89,9 +89,10 @@
function updateClock() {
const now = new Date();
const cob = toCobiets(now);
const xf = cob / COBIE_UNITS.quantic;
const qf = cob / COBIE_UNITS.chronon;
const cf = cob / COBIE_UNITS.eonstrip;
// Use fractional progress within each unit so angles stay small
const xf = (cob % COBIE_UNITS.quantic) / COBIE_UNITS.quantic;
const qf = (cob % COBIE_UNITS.chronon) / COBIE_UNITS.chronon;
const cf = (cob % COBIE_UNITS.eonstrip) / COBIE_UNITS.eonstrip;
document.getElementById('handXeno').style.transform = `rotate(${xf * 360}deg)`;
document.getElementById('handQuantic').style.transform = `rotate(${qf * 360}deg)`;
document.getElementById('handChronon').style.transform = `rotate(${cf * 360}deg)`;