If you are installing the library using npm, then you can use version with command. Like:
npm i mathlib@4.0.0
to install the
4.0.0 version. Nor you can download the latest version from the GitHub repository.
run git clone https://github.com/MarufHasan24/mathlib.git
to download the latest beta
version.
If you are using the library in your project, then you have to import it using require()
function. Like: const mathlib = require('mathlib-n')
.
Then you can use any function or constant of the library by using mathlib.functionName()
or
mathlib.constantName
like: mathlib.add(2, 3)
or mathlib.PI
.
If you getting any unexpected error:
You can report it in the issues section of
the GitHub repository.
npm run fix-memo --prefix /PATH TO node_modules/node_modules/mathlib-n
Don't use sync loop with async memo functions.
mathlib.setmode([mode],[status])
function. Like:
mathlib.setmode('science',8)
. details are in the More page.
you also can change it using terminal. run below command in your terminal:
npm run mode --prefix /PATH TO node_modules/node_modules/mathlib-n
then follow the
instructions.