57 const Vector3 Vector3::inf(FLT_MAX, FLT_MAX, FLT_MAX);
76 setXYZ(u[0],u[1],u[2]);
83 setXYZ(u[0],u[1],u[2]);
88 Vector3::Vector3 (
double x,
double y,
double z)
126 return (
Vector3(r*u[0], r*u[1], r*u[2]) );
134 return sqrt( _xyz[0]*_xyz[0] + _xyz[1]*_xyz[1] + _xyz[2]*_xyz[2] );
141 return _xyz[0]*_xyz[0] + _xyz[1]*_xyz[1] + _xyz[2]*_xyz[2];
148 return max(
max(fabs(_xyz[0]),fabs(_xyz[1])),fabs(_xyz[2])) ;
154 std::ostream& vrender::operator<< (std::ostream& out,
const Vector3& u)
156 out << u[0] <<
" " << u[1] <<
" " << u[2];
double norm() const
Norm.
double infNorm() const
Infinite norm.
~Vector3()
Default destructor.
FARSA_UTIL_TEMPLATE const T max(const T &t1, const U &t2)
double squareNorm() const
Square norm (self dot product)
FARSA_UTIL_TEMPLATE const T min(const T &t1, const U &t2)