I am trying to figure out the angle from 0 Degrees to the Triangle's Hypotenuse. Both X and Y are input values to this function and can be positive or negative values. I need the solution in a mathematical function so I can input X and Y to get the angle.
Thanks!

4 comments
The image for me doesn't work, but you just need a simple trigonometry equation, which is inverse of tangent(Y/X). This should give you the answer, but I am not too sure how you would write inverse of tangent in Lua. Hope this helps!
inverse of tangent is arctangent, in LUA its named as atan
yeah, i just read some more on it. I suggest you use atan2 instead of atan. Here is why: https://scriptinghelpers.org/questions/18670/may-someone-explain-mathatan2-and-its-capabilities
Somewhat useless comment. Trigonometry not "Triganometry." (Just a heads up xdd)