I will load a demo using PlanarAngle
.
Clear[line1, line2, sol]
line1 = InfiniteLine@RandomReal[{0, 1}, {2, 2}];
line2 = InfiniteLine@RandomReal[{0, 1}, {2, 2}];
(*RegionQ/@{line1,line2};*)
sol = RegionIntersection[line1, line2][[-1]];
ang = Min[#,
180 - #] &@(PlanarAngle[{line1[[-1, -1]], sol,
line2[[-1, -1]]}] 180/π);
Graphics[{
Red, Dashed, line1
, Blue, Dashed, line2
, AbsolutePointSize[6], Point@(line1[[-1]])
, AbsolutePointSize[6], Point@(line2[[-1]])
, Thick, Dashing[{}], Red, line1 /. InfiniteLine :> Line
, Thick, Dashing[{}], Blue, line2 /. InfiniteLine :> Line
, Black, Point@sol, Darker@Green, Thin, Circle[sol, 0.04]
}
, Frame -> True
(*,AxesOrigin\[Rule]sol[[-1]]*)
, PlotRange -> Transpose@{sol + 1, sol - 1}
, PlotRangeClipping -> True
, PlotLabel -> Text[Style[ToString@ang <> "°", 16]]
]
A sample output is attached:
VectorAngle[]
. $\endgroup$Abs[]
; just the plain differences should work. $\endgroup$