Arcsine is the inverse function
This means if you have the distance to a point and the y value of that point (relative to you), you can pass it y/distance (opposite over hypotenuse) and it will return the angle.
The LSL function
for this is llAsin
, and arctangent