0.0.5 • Published 4 years ago
async-maths v0.0.5
This package gives math functions to help you at conding.
The most functions are asynchronous, if you don't know use asynchronous functions read this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function
How to use
If you want to sum something:
asyncMaths.sum(10, 10).then(console.log);
You can set a delay to the resulted be returned:
// This will have a delay of 5 sec to console.log
asyncMaths.sum(10, 10, 5).then(console.log);
This package have:
asyncMaths.sum;
asyncMaths.mul;
asyncMaths.div;
asyncMaths.sub;
asyncMaths.pot;
asyncMaths.sqr;
// And more!!
The func doOperation
is the most complex here:
asyncMaths.doOperation(10, 10, 5, "+", mathTypes);
The func doOperation
detect the '+'
and sum 10 by 10.