If you treat your stuff like code (with the three backticks) then you should be able to get it to appear a bit better (I changed it above).
I think it's just a typo, but you wrote atan2(y/z), when you need either atan(y/z) or atan2(y,z)
atan2 is clever, because 12/34 and -12 / -34 should be different angles, but obviously evaluate to the same number. atan2 checks and makes sure that it outputs a value that represents all 360 degrees, and not just 180.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
If you treat your stuff like code (with the three backticks) then you should be able to get it to appear a bit better (I changed it above).
I think it's just a typo, but you wrote
atan2(y/z)
, when you need eitheratan(y/z)
oratan2(y,z)
atan2
is clever, because12/34
and-12 / -34
should be different angles, but obviously evaluate to the same number.atan2
checks and makes sure that it outputs a value that represents all 360 degrees, and not just 180.