Data structure for angle in two dimensions.  
 More...
#include <JAngle2D.hh>
Data structure for angle in two dimensions. 
This class serves as input to the rotation matrix JRotation2D. 
Definition at line 33 of file JAngle2D.hh.
◆ JAngle2D() [1/3]
  
  | 
        
          | JGEOMETRY2D::JAngle2D::JAngle2D | ( |  | ) |  |  | inline | 
 
 
◆ JAngle2D() [2/3]
  
  | 
        
          | JGEOMETRY2D::JAngle2D::JAngle2D | ( | const double | phi | ) |  |  | inline | 
 
Constructor. 
- Parameters
- 
  
  
Definition at line 50 of file JAngle2D.hh.
 
 
◆ JAngle2D() [3/3]
  
  | 
        
          | JGEOMETRY2D::JAngle2D::JAngle2D | ( | const double | x, |  
          |  |  | const double | y |  
          |  | ) |  |  |  | inline | 
 
Constructor. 
- Parameters
- 
  
  
Definition at line 61 of file JAngle2D.hh.
 
 
◆ getPhi()
  
  | 
        
          | double JGEOMETRY2D::JAngle2D::getPhi | ( |  | ) | const |  | inline | 
 
Get phi angle. 
- Returns
- phi angle 
Definition at line 72 of file JAngle2D.hh.
 
 
◆ getDX()
  
  | 
        
          | double JGEOMETRY2D::JAngle2D::getDX | ( |  | ) | const |  | inline | 
 
Get x direction. 
- Returns
- x direction 
Definition at line 83 of file JAngle2D.hh.
 
 
◆ getDY()
  
  | 
        
          | double JGEOMETRY2D::JAngle2D::getDY | ( |  | ) | const |  | inline | 
 
Get y direction. 
- Returns
- y direction 
Definition at line 94 of file JAngle2D.hh.
 
 
◆ negate()
  
  | 
        
          | JAngle2D& JGEOMETRY2D::JAngle2D::negate | ( |  | ) |  |  | inline | 
 
Negate angle. 
- Returns
- this angle 
Definition at line 105 of file JAngle2D.hh.
 
 
◆ add()
Add angle. 
- Parameters
- 
  
  
- Returns
- this angle 
Definition at line 119 of file JAngle2D.hh.
double getPhi() const
Get phi angle.
 
 
 
◆ sub()
Subtract angle. 
- Parameters
- 
  
  
- Returns
- this angle 
Definition at line 133 of file JAngle2D.hh.
 
 
◆ mul() [1/2]
  
  | 
        
          | JAngle2D& JGEOMETRY2D::JAngle2D::mul | ( | const double | factor | ) |  |  | inline | 
 
Scale angle. 
- Parameters
- 
  
    | factor | multiplication factor |  
 
- Returns
- this angle 
Definition at line 147 of file JAngle2D.hh.
 
 
◆ div()
  
  | 
        
          | JAngle2D& JGEOMETRY2D::JAngle2D::div | ( | const double | factor | ) |  |  | inline | 
 
Scale angle. 
- Parameters
- 
  
  
- Returns
- this angle 
Definition at line 161 of file JAngle2D.hh.
 
 
◆ equals()
  
  | 
        
          | bool JGEOMETRY2D::JAngle2D::equals | ( | const JAngle2D & | angle, |  
          |  |  | const double | precision = std::numeric_limits<double>::min() |  
          |  | ) |  | const |  | inline | 
 
Check equality. 
- Parameters
- 
  
    | angle | angle |  | precision | precision |  
 
- Returns
- true if angles are equal; else false 
Definition at line 176 of file JAngle2D.hh.
 
 
◆ getDot()
  
  | 
        
          | double JGEOMETRY2D::JAngle2D::getDot | ( | const JAngle2D & | angle | ) | const |  | inline | 
 
Get dot product. 
- Parameters
- 
  
  
- Returns
- dot product 
Definition at line 189 of file JAngle2D.hh.
 
 
◆ normalise()
  
  | 
        
          | JAngle2D& JGEOMETRY2D::JAngle2D::normalise | ( |  | ) |  |  | inline | 
 
Normalise angle. 
- phi angle will be between 0 and 2π
- Returns
- this angle 
Definition at line 202 of file JAngle2D.hh.
static const double PI
Mathematical constants.
 
 
 
◆ mul() [2/2]
template<class JFirst_t , class JSecond_t > 
  
  | 
        
          | JFirst_t& JMATH::JMath< JFirst_t, JSecond_t >::mul | ( | const JSecond_t & | object | ) |  |  | inlineinherited | 
 
Multiply with object. 
- Parameters
- 
  
  
- Returns
- result object 
Definition at line 354 of file JMath.hh.
  356       return static_cast<JFirst_t&
>(*this) = JFirst_t().mul(
static_cast<const JFirst_t&
>(*
this), 
object);
 
 
 
 
◆ operator>> [1/2]
  
  | 
        
          | std::istream& operator>> | ( | std::istream & | in, |  
          |  |  | JAngle2D & | angle |  
          |  | ) |  |  |  | friend | 
 
Read angle from input. 
- Parameters
- 
  
    | in | input stream |  | angle | angle |  
 
- Returns
- input stream 
Definition at line 220 of file JAngle2D.hh.
  222       return in >> angle.
__phi;
 
 
 
 
◆ operator<< [1/2]
  
  | 
        
          | std::ostream& operator<< | ( | std::ostream & | out, |  
          |  |  | const JAngle2D & | angle |  
          |  | ) |  |  |  | friend | 
 
Write angle to output. 
- Parameters
- 
  
    | out | output stream |  | angle | angle |  
 
- Returns
- output stream 
Definition at line 233 of file JAngle2D.hh.
  235       const JFormat format(out, getFormat<JAngle2D>(
JFormat_t(9, 5, std::ios::fixed | std::ios::showpos)));
 
  237       return out << format << angle.
getPhi();
 
 
 
 
◆ operator>> [2/2]
Read angle from input. 
- Parameters
- 
  
  
- Returns
- reader 
Definition at line 248 of file JAngle2D.hh.
  250       return in >> angle.
__phi;
 
 
 
 
◆ operator<< [2/2]
Write angle to output. 
- Parameters
- 
  
  
- Returns
- writer 
Definition at line 261 of file JAngle2D.hh.
  263       return out << angle.
__phi;
 
 
 
 
◆ __phi
  
  | 
        
          | double JGEOMETRY2D::JAngle2D::__phi |  | protected | 
 
 
The documentation for this class was generated from the following file: