Changeset 3d9045 for molecuilder/src/vector.cpp
- Timestamp:
- Dec 29, 2008, 12:29:21 PM (17 years ago)
- Children:
- 95183e
- Parents:
- eec6c8 (diff), 2ac928 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
molecuilder/src/vector.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/vector.cpp
reec6c8 r3d9045 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.
