@kobayami/math-utils
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

@kobayami/math-utils

Installation

npm install --save @kobayami/math-utils

Version and License

Summary

Some little math helper functions that cover the following areas:

  • Division and modulo
  • Lerp functions (linear interpolation)
  • Clamp functions
  • Root and logarithm
  • Sign and integer
  • Rounding

Usage Example

import { mod, divFloor, divTrunc } from "@kobayami/math-utils/lib";

const two = mod(-13, 5);
const minusThree = divFloor(-13, 5);
const minusTwo = divTrunc(-15, 5);

See Also

Dependencies (0)

    Dev Dependencies (8)

    Package Sidebar

    Install

    npm i @kobayami/math-utils

    Weekly Downloads

    2

    Version

    1.1.4

    License

    MIT

    Unpacked Size

    20.1 kB

    Total Files

    8

    Last publish

    Collaborators

    • kobayami