UNPKG

mathtool-js

Version:

A lightweight and powerful JavaScript math library that includes number theory, combinatorics, and trigonometry functions.

24 lines (14 loc) 579 B
# mathtool-js A comprehensive JavaScript library for mathematical operations, including GCD, LCM, prime factorization, trigonometry, and more! ## Installation You can install the package via npm: ```bash npm install mathtool-js import { gcd, lcm, factorial } from "mathtool-js"; console.log(gcd(4, 20)); // 4 console.log(lcm(4, 5)); // 20 console.log(factorial(5)); // 120 import mathtool from "mathtool-js"; console.log(mathtool.primeFactors(8)); // {2:3} console.log(mathtool.combination(5,3)); // 20 console.log(mathtool.isPrime(5)); // true