The problem is not the sign but the value. I use absolute value of the angle (no matter what method i used to calculate it).

That's eliminates some tests ^^...

So... (this image should help)

We have 2 segment that have in common

The first segment ends in

If the other segment ends in

the angle is alpha

but if the other segment ends in

the angle is beta... now, how can I choose the calculation method?

EDIT:

I'm trying now Law of Cosines too... but maybe i'm too tired now :O

If someone is good at, here is my

source in python, i hope is enough readable.

The input consist in a set of 3 point

and the output should be something like "isosceles right triangle" or "scalene obtuse triangle" or other classification or "not a triangle" if it is not...