I created a program in javascript that calculates vector coordinates, everything was smooth, since I have the correct formula, but when I try to match cosine 143.1301 using Math.cos in javascript, it returns 0.1864 instead of 0.7999 from a scientific calculator why? can anyone explain me why? and also please give me a solution to this problem ... thanks in advance ... :) here, a sample of my code
function cyltoxec(a) { ans = Math.cos(a); return ans.toFixed(4); } var = x; return cyltoxec(x);
source share