Skip to content

API > @blocksuite/blocks > clamp

Function: clamp ​

clamp( n, min, max?): number

Parameters ​

ParameterType
nnumber
minnumber
max?number

Returns ​

number

Defined In ​

packages/blocks/src/surface-block/utils/math-utils.ts:70