Back to functions

nerdamer.set


set

Sets the value of a nerdamer setting. Currently PARSE2NUMBER and IMAGINARY. Setting PARSE2NUMBER to true will let nerdamer always try to return a number whenenver possible. IMAGINARY allows you to change the variable used for imaginary to j for instance.


Usage: nerdamer.set(setting, value)


Parameters

setting setting The setting to be changed
VARIES value The value to set the setting to.

EXAMPLES:
nerdamer.set('PARSE2NUMBER', true);
var x = nerdamer('cos(9)+1');
console.log(x.toString());
nerdamer.set('IMAGINARY', 'j');
x = nerdamer('sqrt(-1)');
console.log(x.toString());
OUTPUT:
Back to functions