I would like to get the angle between two segments, this must be applied to any angled situation.

I have already a function that gets the slope of two segments then the rest is a problem, i cant get the correct result

im using this formula.

angle=(m2-m1)/[1+(m2*m1)]

atan(angle)*180/math.pi

the result must be the added angle of two segments.

sample 1st segment = 90 degree

second segment = 45 degree

result = 135 degree