@useless-javascript-modules/math
v3.0.0
Published
A useless javascript module that does math operations
Downloads
3
Readme
@useless-javascript-modules/math
This useless javascript module does mathematical operations on numbers.
Example:
const math = require('@useless-javascript-modules/math')
math.add(1,2) /* = 3 */
math.subtract(6.2,4) /* = 2.2 */
math.multiply(2,3) /* = 6 */
math.divide(10,3) /* = 3.3333.... */
math.pow(3,3) /* = 27 */
math.root(27,3) /* = 3 */
Supported Math Operations
add
Add the first argument to the second argument
subtract
Subtract the second argument from the first argument.
multiply
Multiply the first argument by the second argument
divide
Divide the first argument by the second argument
pow
The first argument raised to the power of the second argument
root
The first argument to the root of the second argument
Change Log
- 3.0 - Changed API to make it "better"
- 2.1 - Added
pow
androot
operations - 2.0 - Operations now accurately handles fractional numbers
- 1.1 - Added support for multiply and divide operations
- 1.0 - initial release