I am embarrassed that I don't know this, but it has been years since I took these types of math classes.
I want to programmatically draw a line through two points, but these points are not the end points. I want the line to extend through these points by a certain length on either end, say 100 pixels. What would be the formula to calculate the end points if I only know two points in the middle of the line?
Thanks in advance. I can mock up an illustration if this doesn't make sense.
I want to programmatically draw a line through two points, but these points are not the end points. I want the line to extend through these points by a certain length on either end, say 100 pixels. What would be the formula to calculate the end points if I only know two points in the middle of the line?
Thanks in advance. I can mock up an illustration if this doesn't make sense.