It's a really simple problem with a simple solution and I doubt that there's a built-in solution.
All you need to do is to draw a circle on each line with its radius equal to the length of the line and its centre on the stationary end of the line.
You will encounter three possible cases:
- The circles don't intersect - the lines won't meet
- The circles are tangential to each other - the lines will end up co-linear
- The circle intersect at to points - two solutions exist.
This may be tedious if you have a lot of lines, but considering the multiple possible solutions, a built-in function will also require you to inspect that the correct solution has been accepted.
Below is an image showing the two-solution case. The red lines are the initial condition and the blue lines are the two possible solutions:
