Changeset 2ac928 for molecuilder/src/vector.cpp
- Timestamp:
- Dec 23, 2008, 1:28:05 PM (17 years ago)
- Children:
- 3d9045
- Parents:
- fe3c9a
- File:
-
- 1 edited
-
molecuilder/src/vector.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/vector.cpp
rfe3c9a r2ac928 219 219 * \return \f$\acos\bigl(frac{\langle x, y \rangle}{|x||y|}\bigr)\f$ 220 220 */ 221 double Vector::Angle( constVector *y) const221 double Vector::Angle(Vector *y) const 222 222 { 223 223 return acos(this->ScalarProduct(y)/Norm()/y->Norm()); … … 313 313 }; 314 314 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 */ 320 ostream& 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 << ")"; 315 ofstream& operator<<(ofstream& ost,Vector& m) 316 { 317 m.Output(&ost); 329 318 return ost; 330 319 };
Note:
See TracChangeset
for help on using the changeset viewer.
