Standard Toolkit
Packages@accelint/math

Overview

A simple, lightweight JavaScript library that provides a collection of basic mathematical functions.

Installation

pnpm add @accelint/math

Usage

// 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 PathDescription
clampClamps a number within the specified bounds
randomGenerate random numbers and integers within specified bounds
roundRounds a number to a specified precision

On this page