@node581_/mathify
v1.0.1
Published
A simple math library
Readme
@node581_/mathify
A simple math library to perform basic mathematical operations.
Installation
You can install @node581_/mathify from npm:
npm install @node581_/mathify
Usage
// Import the library
import { add, subtract, multiply, divide } from '@node581_/mathify';
// Example usage:
const result1 = add(2, 3); // 5
const result2 = subtract(5, 3); // 2
const result3 = multiply(4, 3); // 12
const result4 = divide(6, 2); // 3
console.log(result1, result2, result3, result4);
API
add(a, b)
Returns the sum of a and b.
Parameters
a (number): The first number.
b (number): The second number.
Example
add(2, 3); // 5
subtract(a, b)
Returns the difference of a and b.
Parameters
a (number): The first number.
b (number): The second number.
subtract(5, 3); // 2