export function byteLocation(x, y) {
requireInteger(x, 'x'); requireInteger(y, 'y');
if (x < 0 || x >= WIDTH || y < 0 || y >= HEIGHT) {
throw new RangeError(`Pixel coordinates must be inside ${WIDTH} × ${HEIGHT}.`);
}
const bit = 7 - (x & 7);
return { offset: y * ROW_BYTES + (x >> 3), bit, mask: 1 << bit };
}
eb
elliott typing…x 0.500 / y 0.500code → thought → code
Tap a line to explore it; each new activation reveals another source experiment. With a keyboard, use up and down to choose a line, Space to reveal its graphic, N to discover the next experiment, and Escape to return to code. In Git history, left and right select commits. Drag a graphic to pull it. In ECDSA, left and right step through signing and verification; use the controls to play or change the message hash.