From 6a9fa5b7cb93dfea54d93f998c54dee65ce74128 Mon Sep 17 00:00:00 2001 From: Anthony Lieuallen Date: Tue, 22 Nov 2022 08:52:08 -0500 Subject: [PATCH] use cx/cy rather than magic number --- colors.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/colors.html b/colors.html index 0279644..c479b96 100644 --- a/colors.html +++ b/colors.html @@ -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; });