I want to check if two connected lines are collinear. If yes then I want to place at the middle point an object. To give the collinearity a little bit of tolerance $±5°$ would be a nice addition.
You can do this, for example, by comparing the direction vectors between the points, thus creating a selection.
Something like this:
Here I get the direction vectors of the edges with the node
Edge Vertices, and compare them with the node
The epsilon of $0.087$ corresponds to an angle of $5°$ (The values are in radians!).
Additionally I use the node
Compare to select a certain point.
Both selections together then result in the selection for the instantiation of the desired object at the desired point, as soon as the angle between the two lines is less than $5°$.