Data structure for normalised vector in two dimensions.  
 More...
#include <JVersor2D.hh>
Data structure for normalised vector in two dimensions. 
Definition at line 20 of file JVersor2D.hh.
 
◆ JVersor2D() [1/2]
  
  
      
        
          | JGEOMETRY2D::JVersor2D::JVersor2D  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Default constructor. 
This constructor yields a unit y-vector. 
 
Definition at line 27 of file JVersor2D.hh.
 
 
◆ JVersor2D() [2/2]
  
  
      
        
          | JGEOMETRY2D::JVersor2D::JVersor2D  | 
          ( | 
          const double |           dx,  | 
         
        
           | 
           | 
          const double |           dy ) | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 39 of file JVersor2D.hh.
   40                               :
   43    {
   45    }
JVersor2D & normalise()
Normalise versor.
 
 
 
 
◆ getDX()
  
  
      
        
          | double JGEOMETRY2D::JVersor2D::getDX  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get x direction. 
- Returns
 - x direction 
 
Definition at line 53 of file JVersor2D.hh.
 
 
◆ getDY()
  
  
      
        
          | double JGEOMETRY2D::JVersor2D::getDY  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get y direction. 
- Returns
 - y direction 
 
Definition at line 64 of file JVersor2D.hh.
 
 
◆ getPhi()
  
  
      
        
          | double JGEOMETRY2D::JVersor2D::getPhi  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get phi angle. 
- Returns
 - phi angle [rad] 
 
Definition at line 75 of file JVersor2D.hh.
 
 
◆ negate()
  
  
      
        
          | JVersor2D & JGEOMETRY2D::JVersor2D::negate  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Negate versor. 
- Returns
 - this versor 
 
Definition at line 86 of file JVersor2D.hh.
   87    {
   90 
   91      return *this;
   92    }
 
 
 
◆ equals()
  
  
      
        
          | bool JGEOMETRY2D::JVersor2D::equals  | 
          ( | 
          const JVersor2D & |           versor,  | 
         
        
           | 
           | 
          const double |           precision = std::numeric_limits<double>::min() ) const | 
         
       
   | 
  
inline   | 
  
 
Check equality. 
- Parameters
 - 
  
    | versor | versor  | 
    | precision | precision  | 
  
   
- Returns
 - true if versors are equal; else false 
 
Definition at line 102 of file JVersor2D.hh.
  104    {
  105      return (fabs(
getDX() - versor.getDX()) <= precision &&
 
  106              fabs(
getDY() - versor.getDY()) <= precision);
 
  107    }
double getDX() const
Get x direction.
 
double getDY() const
Get y direction.
 
 
 
 
◆ getDot()
  
  
      
        
          | double JGEOMETRY2D::JVersor2D::getDot  | 
          ( | 
          const JVersor2D & |           versor | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get dot product. 
- Parameters
 - 
  
  
 
- Returns
 - dot product 
 
Definition at line 116 of file JVersor2D.hh.
  117    {
  118      return
  119        getDX() * versor.getDX() + 
 
  120        getDY() * versor.getDY();
 
  121    }
 
 
 
◆ getPerpDot()
  
  
      
        
          | double JGEOMETRY2D::JVersor2D::getPerpDot  | 
          ( | 
          const JVersor2D & |           versor | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get perpendicular dot product. 
- Parameters
 - 
  
  
 
- Returns
 - perpendicular dot product 
 
Definition at line 130 of file JVersor2D.hh.
  131    {
  132      return
  133        getDX() * versor.getDY() - 
 
  134        getDY() * versor.getDX();
 
  135    }
 
 
 
◆ normalise()
  
  
      
        
          | JVersor2D & JGEOMETRY2D::JVersor2D::normalise  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Normalise versor. 
This operation may set the result to the unit y-vector.
- Returns
 - this versor 
 
Definition at line 144 of file JVersor2D.hh.
  145    {
  147 
  148      if (v != 0.0) {
  151      } else {
  154      }
  155 
  156      return *this;
  157    }
 
 
 
◆ __dx
  
  
      
        
          | double JGEOMETRY2D::JVersor2D::__dx | 
         
       
   | 
  
protected   | 
  
 
 
◆ __dy
  
  
      
        
          | double JGEOMETRY2D::JVersor2D::__dy | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following file: