I am working with the built in Math library in js, and need a way to call its functions (eg:sin) without using Math.
before the function name. Is there a way I can import it (without node) so this could be achieved, such that the following code would be valid? :
var equation = "sin(x)";
eval(equation.replace("x","0")); // Should return 0