You could solve this with the cosine rule (or whatever it's called in english (translating from dutch here)).
if you got the following situation:
then:
L2²=L1²+L3²-2*L1*L2*cos(a)
You can get cos(a) from that, so use arccos(L2²-etc. etc.) to get a.
[edit]
You could probably keep some sort of cosine table, so you can do rough estimates instead of calculating that arccos everytime
[/edit]