If I have 4 nodes on a line, for example:
- Main line is formed by nodes
A(0,0) and B(5,0)
- and there is a line on this main line which is formed by
C(2,0) and D(4,0)
It is clear that vector AB
has the same direction with vector CD
, or in other words, vector BA
has the same direction with vector DC
.
I know it is simple, that in this case we just calculate delta x and then divided by each length
.
Is there any common technique and in a "straight-way fashion"?
For example by comparing the gradients (which is in this case, it would be still valid, since both gradients are zero, but if the coordinates are conversed, the computation will be error, since the gradients cannot be computed by dividing by zero).
Thanks in advance.