# Calculate angle of triangle

I need to calculate the angle between two sides, I have the length of A & B sides, but don't know how to find the angle...

Both sides are the same length.

I can get the start and end vectors of each side, I can also get the center values of each side.

Here's an image better describing my question: • We need more information. – Ali Caglayan Sep 1 '13 at 1:31
• You only know two sides and no angle. This is not enough information to calculate that angle. – imranfat Sep 1 '13 at 1:31
• What additional information do you need? – Shannon Hochkins Sep 1 '13 at 1:34
• As I said I don't know! :( but what else do you need to calculate the angle? I'll see if I can get it @Alizter – Shannon Hochkins Sep 1 '13 at 1:34
• What else do you need @imranfat? – Shannon Hochkins Sep 1 '13 at 1:39

Assuming you have points: $$A=(A_x, A_y),\ B=(B_x,B_y)$$ And two equal sides with length $l$ originating from a shared point $O=(0,0)$, then the angle between $AO$ and $BO$ will be: $$\cos\theta = \frac{AO\cdot BO}{l^2}$$ $$\theta = \cos^{-1} \left(\frac{A_xB_x+A_yB_y}{l^2}\right)$$ This is just a particular case of the dot product.