snap_to_grid

photonforge.snap_to_grid(value)

Snap the value to the current grid.

Parameters:

value (float | Sequence[float] | Sequence[Sequence[float]]) – Value or sequence of values to snap.

Returns:

Value snapped to the grid.

Return type:

float | ndarray

See also

config.grid