Jpp 19.3.0
the software that should make you happy
Loading...
Searching...
No Matches
JASTRONOMY::angle_type_rad Struct Reference

Auxiliary data structure for pair of angles. More...

#include <JAstronomy.hh>

Inheritance diagram for JASTRONOMY::angle_type_rad:
JASTRONOMY::angle_type JLANG::JEquals< JFirst_t, JSecond_t > JASTRONOMY::JGalacticCoordinates JASTRONOMY::JGeographicalLocation JASTRONOMY::JNeutrinoDirection JASTRONOMY::JSourceLocation JASTRONOMY::JSourceLocationJ2000 JASTRONOMY::JAstronomy JASTRONOMY::JMorphology JASTRONOMY::JMorphologyBinary JASTRONOMY::JMorphologyGauss JASTRONOMY::JMorphologyGauss2D JASTRONOMY::JMorphologyHistogram JASTRONOMY::JMorphologyPoint

Public Member Functions

 angle_type_rad ()
 Default constructor.
 
 angle_type_rad (const double theta, const double phi)
 Constructor.
 
 angle_type_rad (const angle_type_deg &angle)
 Conversion constructor.
 
void set (const angle_type_deg &angle)
 Convert angle.
 
bool equals (const angle_type &angle, const double precision=std::numeric_limits< double >::min()) const
 Check equality.
 

Protected Attributes

double _theta_
 
double _phi_
 

Friends

struct angle_type_deg
 
struct J2000
 

Detailed Description

Auxiliary data structure for pair of angles.

Definition at line 258 of file JAstronomy.hh.

Constructor & Destructor Documentation

◆ angle_type_rad() [1/3]

JASTRONOMY::angle_type_rad::angle_type_rad ( )
inline

Default constructor.

Definition at line 264 of file JAstronomy.hh.

265 {}

◆ angle_type_rad() [2/3]

JASTRONOMY::angle_type_rad::angle_type_rad ( const double theta,
const double phi )
inline

Constructor.

Parameters
thetatheta [rad]
phiphi [rad]

Definition at line 274 of file JAstronomy.hh.

275 :
276 angle_type(theta, phi)
277 {}
angle_type()
Default constructor.

◆ angle_type_rad() [3/3]

JASTRONOMY::angle_type_rad::angle_type_rad ( const angle_type_deg & angle)

Conversion constructor.

Parameters
angleangle [deg]

Definition at line 357 of file JAstronomy.hh.

357 :
358 angle_type(getRadians(angle._theta_), getRadians(angle._phi_))
359 {}
double getRadians(const double angle)
Convert angle to radians.

Member Function Documentation

◆ set()

void JASTRONOMY::angle_type_rad::set ( const angle_type_deg & angle)
inline

Convert angle.

Parameters
angleangle [rad]

Definition at line 293 of file JAstronomy.hh.

294 {
295 static_cast<angle_type_rad&>(*this) = angle_type_rad(angle);
296 }
angle_type_rad()
Default constructor.

◆ equals()

bool JASTRONOMY::angle_type::equals ( const angle_type & angle,
const double precision = std::numeric_limits<double>::min() ) const
inlineinherited

Check equality.

Parameters
anglepair of angles
precisionprecision
Returns
true if angles are equal; else false

Definition at line 194 of file JAstronomy.hh.

196 {
197 return (fabs(this->_theta_ - angle._theta_) <= precision &&
198 fabs(this->_phi_ - angle._phi_) <= precision);
199 }

Friends And Related Symbol Documentation

◆ angle_type_deg

friend struct angle_type_deg
friend

Definition at line 299 of file JAstronomy.hh.

◆ J2000

friend struct J2000
friend

Definition at line 300 of file JAstronomy.hh.

Member Data Documentation

◆ _theta_

double JASTRONOMY::angle_type::_theta_
protectedinherited

Definition at line 250 of file JAstronomy.hh.

◆ _phi_

double JASTRONOMY::angle_type::_phi_
protectedinherited

Definition at line 251 of file JAstronomy.hh.


The documentation for this struct was generated from the following file: