Rivet API documentation
![]() |
Rivet 4.1.3
|
Public Types |
Public Member Functions |
Static Public Member Functions |
Friends |
List of all members
Rivet::Vector2 Class Reference
Two-dimensional specialisation of Vector. More...
#include <Vector2.hh>
Inheritance diagram for Rivet::Vector2:
Public Types | |
| using | EVector |
| Vector. | |
Public Member Functions | |
| template<typename V2TYPE> | |
| Vector2 (const V2TYPE &other) | |
| Vector2 (const Vector< 2 > &other) | |
| Vector2 (double x, double y) | |
| double | x () const |
| double | y () const |
| Vector2 & | setX (double x) |
| Vector2 & | setY (double y) |
| double | dot (const Vector2 &v) const |
| Dot-product with another vector. | |
| double | angle (const Vector2 &v) const |
| Angle in radians to another vector. | |
| Vector2 | unitVec () const |
| Unit-normalized version of this vector. | |
| Vector2 | unit () const |
| Synonym for unitVec. | |
| Vector2 & | operator*= (const double a) |
| Vector2 & | operator/= (const double a) |
| Vector2 & | operator+= (const Vector2 &v) |
| Vector2 & | operator-= (const Vector2 &v) |
| Vector2 | operator- () const |
| const double & | get (const size_t index) const |
| const double & | operator[] (const size_t index) const |
| Direct access to vector elements by index. | |
| Vector< N > & | set (const size_t index, const double value) |
| Set indexed value. | |
| constexpr size_t | size () const |
| Vector dimensionality. | |
| bool | isZero (double tolerance=1E-5) const |
| Check for nullness, allowing for numerical precision. | |
| double | mod2 () const |
| Calculate the modulus-squared of a vector. \( \sum_{i=1}^N x_i^2 \). | |
| double | mod () const |
| Calculate the modulus of a vector. \( \sqrt{\sum_{i=1}^N x_i^2} \). | |
| bool | operator== (const Vector< N > &a) const |
| bool | operator!= (const Vector< N > &a) const |
Static Public Member Functions | |
| static Vector2 | mkX () |
| static Vector2 | mkY () |
Detailed Description
Two-dimensional specialisation of Vector.
The documentation for this class was generated from the following file:
- /builds/hepcedar/rivet/include/Rivet/Math/Vector2.hh
Generated on for Rivet by
