Skip to content

utils/math

Here are all math related utils.

Use @zl-asica/react or @zl-asica/react/utils for all utils.

Example

tsx
import { clamp } from '@zl-asica/react';

const MyComponent = () => {
  const clampNumber = clamp(5, 1, 10);
  // clampNumber will be 5
  return <p>{clampNumber}</p>;
};

Functions

Released under the MIT License.