Function: nearestCell()
ts
function nearestCell(
layout,
point,
maxDistance?
): Cell | undefined;The cell nearest point: the one containing it, or else the one whose edge is closest. With maxDistance, only cells within that distance count.
Parameters
| Parameter | Type | Default value |
|---|---|---|
layout | Layout | undefined |
point | Vec | undefined |
maxDistance | number | Infinity |
Returns
Cell | undefined