Light Mode
Dark Mode
Triangle-Angles
function triangleAngles(a, b, c){
  let A = Math.acos((b^2 + c^2 - a^2)/2*b*c)
  let B = Math.acos((a^2 + c^2 - b^2)/2*a*c)
  let C = Math.acos((b^2 + a^2 - c^2)/2*a*b)
  return [Math.floor(A * 57.2958),
          Math.floor(B * 57.2958),
          Math.floor(C * 57.2958)]
}

Hi guys. This function returns [null, null, null]. Does anyone have an idea why?

  • a
  • angles
  • of
  • the
  • triangle
  • triangle-angles
Created: July 4, 2018, 9:42 p.m.
Updated: July 5, 2018, 2:22 a.m.
0
1
User avatar
ismarguitar