Update documentation

This commit is contained in:
2024-12-01 15:16:30 -05:00
parent b7eed2297a
commit 06069fdcea
6 changed files with 95 additions and 24 deletions

View File

@ -1,5 +1,7 @@
export function plot(x: number, y: number, image: ImageData) {
// Translate (x,y) coordinates to pixel coordinates.
// Translate (x,y) coordinates to pixel coordinates;
// also known as a "camera" function.
//
// The display range we care about is x=[0, 1], y=[0, 1],
// so our pixelX and pixelY coordinates are easy to calculate:
const pixelX = Math.floor(x * image.width);