cool-math
v1.0.4
Published
A set of very cool math functions for your JS code ๐.
Maintainers
Readme
Cool Math ๐
Hi! My name is Pietro Piva Vieira, and this is my personal project called Cool Math. This project aims to provide a set of (cool ๐) mathematical functions that are missing in the JavaScript standard library.
Features
- A variety of mathematical functions;
- Easy to use and integrate into your projects;
- Open source and free to use under the MIT License;
- ESM support (no support for CJS);
- Can be used both in Node.js and in the browser;
- It's very cool! ๐.
Installation
You can install Cool Math via npm:
npm install cool-mathUsage
Here's a simple example of how to use Cool Math in your project:
import * as coolMath from "cool-math";
const result = coolMath.add(40, 2);
console.log(result);You can also import specific functions:
import { add } from "cool-math";
const result = add(6, 7);
console.log(result);And even import directly from the modules you need:
import { stdDev } from "cool-math/statistics/std-dev";
const data = [10, 12, 23, 23, 16, 23, 21, 16];
const result = stdDev(data);
console.log(result);Contributing
Contributions are welcome! If you'd like to contribute to Cool Math, please fork the repository and submit a pull request.
