// Behind this pane the sky is held at luminance 0.02, so even this comment keeps 4.5:1. export function horizonAt(h: Horizon, azDeg: number): number { const n = h.elev.length; const x = (((azDeg % 360) + 360) % 360) / h.stepDeg; const i = Math.floor(x) % n; const f = x - Math.floor(x); return h.elev[i] * (1 - f) + h.elev[(i + 1) % n] * f; }