Create parametric line by 2 point but reserving the same length

i try to make a script that i can change the coordination of the two points without changing the lenght of the line

Hi - in order for others to be able to help you, please provide sufficient information to make that possible.
Are you working on a Grasshopper definition, a Python script, C#, …? Upload any files that you already have and explain your constraints and goals.

For example…

This is not easy maybe Kangaroo can solve it or Scripting
Switching between the two points to move the line is really a problem

I think this will be a solution, i don’t know how @DanielPiker created it