Skip to content

Commit

Permalink
calc angle
Browse files Browse the repository at this point in the history
  • Loading branch information
ledyba committed Jul 23, 2021
1 parent dbb97f8 commit 176a2b3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/src/controller/omote/RandomSelectionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ export default class RandomSelectionController {
if(m.iconID === undefined) {
continue;
}
if(m.timestamp === undefined) {
continue;
}
const start = m.timestamp.startOf('year');
const end = m.timestamp.endOf('year');
const angle = (m.timestamp.diff(start) / end.diff(start)) * Math.PI * 2;
const p = formatMomentPath(m.timestamp!!);
results.push({
angle: 0.0,
angle: angle,
date: formatMomentTime(m.timestamp!!),
title: m.title,
path: p,
Expand Down

0 comments on commit 176a2b3

Please sign in to comment.