As far as I understood you just want to know if the line from A to B has the same angle as the line from B to C.
This should not be very hard, but for many points this can be quite a number of...