So I have this psuedo code here (converted from c# to show you better)
Orientation returns -1 if the angle is > 180, 0 if it is 180 and 1 if its > 180 A point contains X and Y Given: Point p1, p2, p3 if Orientation(v1, v2, v3) is 0 then return 180 a = EuclideanDistance(p2, p3) b = EuclideanDistance(p1, p2) c = EuclideanDistance(p1, p3) angle = arccos((a^2 + b^2 - c^2) / 2ab) return angle
The problem is when you come to the angle, p3 is on the left ( >180 ) then you have the problem that its only getting the inner angle on the left and not the complete outer angle
Would doing this be correct?
if Orientation(v1, v2, v3) < 0 then angle = 360 - angle return angle
Or is there a better way of finding this?