extended-math

A collection of JavaScript mathemtatical helper functions and constant values.

Usage no npm install needed!

<script type="module">
  import extendedMath from 'https://cdn.skypack.dev/extended-math';
</script>

README

Extended Math

NPM version Build Status Coverage Status Known Vulnerabilities Dependencies Downloads Install Size Contributors Pull Requests Welcome

A collection of JavaScript mathemtatical helper functions and constant values.

Documentation

Complete API documentation is available here.

Client-Side Usage

<script src="extended-math.js"></script>

<script type="text/javascript">
    extendedMath.clamp(5, 0, 2); // => 2 
</script>

Server-Side Usage

const extendedMath = require("extended-math");

extendedMath.normalize(1, 0, 2); // => 0.5

Installation

To install this module:

npm install extended-math

Building

To build the distribution files for this module:

npm run build

Running Unit Tests

To run the unit test suite for this module:

npm run test

Generating Documentation

npm run docs