I was wondering if anyone could help me with this little problem. What I am actually trying to do is implement 'picking' into a game I'm doing, but I'm actually stuck with some of the maths, thats why this isn't in the game forum.

I'm trying to work out a field of view for a camera. If you look at the picture below, I'm trying to work out angle *x* while knowing the length of sides a and b.

My brother knows a bit about maths and he said you do it like this:*x* = Tan-1 (b/a)

Anyone have a clue how to do this in code? I'm not familliar at all with math functions so it would be a great help.