Skip to content

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 ​

ParameterTypeDefault value
layoutLayoutundefined
pointVecundefined
maxDistancenumberInfinity

Returns ​

Cell | undefined

Hat tiling and isohedral tilings after Craig S. Kaplan's hatviz and Tactile (BSD 3-Clause).