Packages@accelint/math
Overview
A simple, lightweight JavaScript library that provides a collection of basic mathematical functions.
Installation
pnpm add @accelint/mathUsage
// Import from root (all exports)
import { clamp, random, randomInt, round } from '@accelint/math';
// Import from sub-modules
import { clamp } from '@accelint/math/clamp';
import { random, randomInt } from '@accelint/math/random';
import { round } from '@accelint/math/round';Available Exports
| Export Path | Description |
|---|---|
| clamp | Clamps a number within the specified bounds |
| random | Generate random numbers and integers within specified bounds |
| round | Rounds a number to a specified precision |
Related
- @accelint/core - Core functional utilities
- GitHub Repository - Source code