I am trying to find a way to extend a line segment by a specific distance. For example if I have a line segment starting at 10,10 extending to 20,13 and I want to extend th
I just stumbled upon this after searching for this myself, and to give you an out-of-the-box solution, you can have a look at the code inside a standard Vector class (in any language) and cherry pick what parts you need, but I ended up using one and the code looks like this :
vector.set(x,y);
vector.normalize();
vector.multiply(10000);// scale it by the amount that you want
Good luck !