equal
deleted
inserted
replaced
91 XY center(ms.arrow_pos[edge]); |
91 XY center(ms.arrow_pos[edge]); |
92 |
92 |
93 XY unit_vector_in_dir(head-center); |
93 XY unit_vector_in_dir(head-center); |
94 double length=sqrt( unit_vector_in_dir.normSquare() ); |
94 double length=sqrt( unit_vector_in_dir.normSquare() ); |
95 |
95 |
96 unit_vector_in_dir/=length; |
96 if(length!=0) |
|
97 { |
|
98 unit_vector_in_dir/=length; |
|
99 } |
97 |
100 |
98 // update the arrow |
101 // update the arrow |
99 drawArrow(unit_vector_in_dir); |
102 drawArrow(unit_vector_in_dir); |
100 |
103 |
101 // update the edge |
104 // update the edge |