use cx/cy rather than magic number

This commit is contained in:
Anthony Lieuallen 2022-11-22 08:52:08 -05:00
parent c514277e31
commit 6a9fa5b7cb
1 changed files with 2 additions and 2 deletions

View File

@ -244,8 +244,8 @@ function renderWheel() {
let colorRadius = (s + v/5)*0.75 * radius;
let colorAngle = h/360 * 2 * Math.PI;
let x = Math.cos(colorAngle) * colorRadius + 512;
let y = Math.sin(colorAngle) * colorRadius + 512;
let x = Math.cos(colorAngle) * colorRadius + cx;
let y = Math.sin(colorAngle) * colorRadius + cy;
sites.push({x: x, y: y});
colorsBySite[[x, y]] = name;
});