How to use an inverse tangent in Unity JS?

I am trying to change the direction in which my character is facing using a tangent function.

rotation = transform.position.y - yPosBeUp/ (transform.position.x - xPosBeUp) * /insert inverse of tangent function here/;

But I can’t seem to find a function to get me the inverse of tangent.

Sorry if this is already asked or if I’m asking in the wrong way, I’m new to asking questions. Any help is greatly appreciated!

Sounds like you’re looking for Mathf.Atan, but I don’t really understand why. What is “rotation”, “yPosBeUp”, “xPosBeUp” in this context? What can you not achieve using the built in Quaternion and Vector rotation functions (or simply setting the vector of transform.forward)?