Sorry to bring up something similar to this again, but there are several formulas for this and i'd like to know a efficient way to do it in EE (performance is quite important for this):

Suppose I have a Plane (Vec source, and Vec normal) and I have have another Vec pos infront of this plane. How can I calculate the AbsAngleBetween from the source to the pos, governed by the normal?

Attached is a diagram - how to find theta?

(I tried using a closest point on line segment function from pos to normal, and performing basic trig on the right angle triangle.. but it's very inefficient.)

What's a good way to do this in EE?

Thanks so much,

Chris