Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/vector.cpp

    re4ea46 r44fd95  
    219219 * \return \f$\acos\bigl(frac{\langle x, y \rangle}{|x||y|}\bigr)\f$
    220220 */
    221 double Vector::Angle(Vector *y) const
     221double Vector::Angle(const Vector *y) const
    222222{
    223223  return acos(this->ScalarProduct(y)/Norm()/y->Norm());
     
    313313};
    314314
    315 ofstream& operator<<(ofstream& ost,Vector& m)
    316 {
    317         m.Output(&ost);
     315/** Prints a 3dim vector to a stream.
     316 * \param ost output stream
     317 * \param v Vector to be printed
     318 * \return output stream
     319 */
     320ostream& operator<<(ostream& ost,Vector& m)
     321{
     322  ost << "(";
     323  for (int i=0;i<NDIM;i++) {
     324    ost << m.x[i];
     325    if (i != 2)
     326      ost << ",";
     327  }
     328  ost << ")";
    318329        return ost;
    319330};
Note: See TracChangeset for help on using the changeset viewer.