56 const Vector2 Vector2::inf(FLT_MAX, FLT_MAX);
103 return Vector2(r*u[0], r*u[1]) ;
111 return sqrt( _xyz[0]*_xyz[0] + _xyz[1]*_xyz[1] );
118 return _xyz[0]*_xyz[0] + _xyz[1]*_xyz[1] ;
125 return max(fabs(_xyz[0]),fabs(_xyz[1])) ;
131 std::ostream& operator<< (std::ostream& out,
const Vector2& u)
133 out << u[0] <<
" " << u[1] ;
double squareNorm() const
Square norm (self dot product)
Vector2()
Default constructor.
FARSA_UTIL_TEMPLATE const T max(const T &t1, const U &t2)
~Vector2()
Default destructor.
FARSA_UTIL_TEMPLATE const T min(const T &t1, const U &t2)
double norm() const
Norm.
double infNorm() const
Infinite norm.