JSFiddle - React, Tailwind, and code Playground
JavaScript
function submit() {
var a = document.getElementById('var1').value; //in this case 44 meant to be 44 degrees
var b = document.getElementById('var2').value;
alert(a);
myGraph.drawEquation(function(x) {
return x*Math.tan(a)-((9.80665*(x*x))/(2*b^2*Math.cos(a)^2));
}, 'red', 3); //In both tan(a) and cos(a) javascript assumes 44 radians, instead of 44 degrees.
}