Atan2 is not defined


#1

2 * atan2( sqrt(a), sqrt(1-a) )


#2

atan2 is not in the window scope. Try Math.atan2: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2


#3

Also, please google stuff. This is the second question


#4