Example
Use floor to map a continuous point to the pixel cell that contains it.
highlighted = computed this step
Step 1 — Start with a pixel grid
Start with a continuous point over the grid.
use floor to choose the cell
Step 2 — Floor the x-coordinate
Floor x to choose the pixel column.
⌊37⌋=2
Step 3 — Floor the y-coordinate
Floor y to choose the pixel row.
⌊411⌋=2
Step 4 — Highlight the pixel
Highlight the cell containing the point.
pixel=(2,2)
plot-point-to-pixel
A pixel cell is addressed by an integer row and column. The floor function chooses the cell containing a non-integer coordinate.