7 #ifndef __math_Vector2_h__ 8 #define __math_Vector2_h__ 13 typedef Vector<2,double> Vector2d;
14 typedef Vector<2,float> Vector2f;
15 typedef Vector<2,FE_UWORD> Vector2u;
16 typedef Vector<2,I32> Vector2i;
17 typedef Vector<2,Real> Vector2;
20 inline Vector<2,F32>::Vector(
void)
28 inline Vector<2,F32>::Vector(
const Vector<2,U>& other)
35 inline Vector<2,T>&
set(Vector<2,T> &lhs)
42 template<
class T,
typename U,
typename V>
43 inline Vector<2,T>&
set(Vector<2,T> &lhs, U x, V y=0.0)
51 inline Vector<2,T> operator+(
const Vector<2,T> &lhs,
const Vector<2,T> &rhs)
53 return Vector<2,T>(lhs[0]+rhs[0],lhs[1]+rhs[1]);
57 inline Vector<2,T> operator-(
const Vector<2,T> &lhs,
const Vector<2,T> &rhs)
59 return Vector<2,T>(lhs[0]-rhs[0],lhs[1]-rhs[1]);
64 inline void polyInterp(
const Array<Vector<2,T> > &a_xy,
const T &a_x,
68 T den, dif, dift, ho, hp, w;
72 dif = fabs(a_x - a_xy[0][0]);
76 for(I32 i=0; i < n; i++)
78 if((dift=fabs(a_x - a_xy[i][0])) < dif)
87 for(I32 m = 1; m < n; m++)
89 for(I32 i = 0; i < n-m; i++)
94 if( (den=ho-hp) == 0.0 ) { feX(
"polyInterp failure"); }
99 a_y += (a_dy=( 2*ns < (n-m-1) ? c[ns+1] : d[ns--] ));
kernel
Definition: namespace.dox:3