Changeset 6b3826 for molecuilder/src/vector.cpp
- Timestamp:
- Nov 27, 2008, 9:55:08 AM (17 years ago)
- Children:
- f5b58e
- Parents:
- a709c4
- File:
-
- 1 edited
-
molecuilder/src/vector.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/vector.cpp
ra709c4 r6b3826 115 115 }; 116 116 117 118 /** Calculates VectorProduct between this and another vector. 119 * -# returns the Product in place of vector from which it was initiated 120 * -# ATTENTION: Only three dim. 121 * \param *y array to vector with which to calculate crossproduct 122 * \return \f$ x \times y \f& 123 */ 124 void Vector::VectorProduct(const Vector *y) 125 { 126 Vector tmp; 127 tmp[0] = x[1]*y->x[2] - x[2]*y->x[1]; 128 tmp[1] = x[2]*y->x[0] - x[0]*y->x[2]; 129 tmp[2] = x[0]*y->x[1] - x[1]*Y->x[0]; 130 this->CopyVector(&tmp); 131 132 }; 133 134 117 135 /** projects this vector onto plane defined by \a *y. 118 136 * \param *y array to normal vector of plane … … 184 202 }; 185 203 186 /** Calculates the angle between this and another vector. 204 /** Calculates the angle between this and another vector. 187 205 * \param *y array to second vector 188 206 * \return \f$\acos\bigl(frac{\langle x, y \rangle}{|x||y|}\bigr)\f$
Note:
See TracChangeset
for help on using the changeset viewer.
