mathlib() is a function that can be used to get status. It will run an animation in your terminal. It's not
for any mathematical purpose. It's an ester egg of mathlib function. Just wait a while and after a few
seconds you will be able to know the
setmode is a function that can be used to set mode. It will set the mode of calculation. There are three
modes avilable in mathlib-n. They are normal, scientific and fixed. And status range is
1-14. You can set mode by
using setmode(mode,status)
. like :
const mathlib = require('mathlib-n');
mathlib.setmode('sci', 5); // set mode to scientific and status to 5
or to set mode to fixed :
const mathlib = require('mathlib-n');
mathlib.setmode('fix', 5); // set mode to fixed and status to 5
or you can use setmode()
to set mode to normal and status to null.
getmode is a function that is used to get current mode. It will return the mode of calculation. There are
three
modes avilable in mathlib-n. They are normal, scientific and fixed. You can get mode by
using getmode()
. like :
const mathlib = require('mathlib-n');
mathlib.getmode(); // return current mode
if mode if fixed and status is 7 then output should be:
{ mode: 'fixed', status: 7 }