1 #ifndef SELDON_FILE_TINY_VECTOR_CXX
3 #include "TinyVector.hxx"
23 T dx = pointB(0)-pointA(0);
24 T dy = pointB(1)-pointA(1);
25 T dxj = pt2(0)-pt1(0);
26 T dyj = pt2(1)-pt1(1);
27 T delta = dx*dyj-dy*dxj;
32 x = (dxj*dx*(pointA(1)-pt1(1))+pt1(0)*dyj*dx-pointA(0)*dy*dxj)/delta;
33 y = -(dyj*dy*(pointA(0)-pt1(0))+pt1(1)*dxj*dy-pointA(1)*dx*dyj)/delta;
37 if (((x-pt1(0))*(x-pt2(0)))<=threshold)
39 if (((y-pt1(1))*(y-pt2(1)))<=threshold)
41 if (((x-pointA(0))*(x-pointB(0)))<=threshold)
43 if (((y-pointA(1))*(y-pointB(1)))<=threshold)
54 if (abs(dx*(pt1(1)-pointA(1))-dy*(pt1(0)-pointA(0)))<=threshold)
78 T dx = pointB(0)-pointA(0);
79 T dy = pointB(1)-pointA(1);
80 T dxj = pt2(0)-pt1(0);
81 T dyj = pt2(1)-pt1(1);
82 T delta = dx*dyj-dy*dxj;
85 if (abs(delta) > threshold)
87 x=(dxj*dx*(pointA(1)-pt1(1))+pt1(0)*dyj*dx-pointA(0)*dy*dxj)/delta;
88 if (abs(dx) > abs(dxj))
89 y = dy/dx*(x-pointA(0)) + pointA(1);
91 y = dyj/dxj*(x-pt1(0)) + pt1(1);
98 if (abs(dx*(pt1(1)-pointA(1))-dy*(pt1(0)-pointA(0))) <= threshold)
115 for (
int i = 0; i < 3; i++)
116 coord(i) = abs(normale(i));
118 Sort(3, coord, perm);
119 u1.Zero(); u1(perm(2)) = -normale(perm(1));
120 u1(perm(1)) = normale(perm(2));
125 typename ClassComplexType<T>::Treal one;
127 Mlt(one/
Norm2(u1), u1); Mlt(one/
Norm2(u2), u2);
132 #define SELDON_FILE_TINY_VECTOR_CXX