chickadee » hexgrid » grid->world

world>originhex-radiusworld> cellprocedure

Return the world/screen coordinates of the center of cell.

origin is the position, in world/screen coordinates, of the cell at row 0, column 0.

hex-radius is the distance, in world/screen coordinates, between the center of a hexagon and any of its vertices (which is the same as the length of one hexagon side).

No bounds wrap-around or checking is done. See horizontal-wrapper, vertical-wrapper or within-bounds? for that.

(Note: curried.)