Auxiliary data structure for pair of angles.
More...
#include <JAstronomy.hh>
|
bool | equals (const angle_type &angle, const double precision=std::numeric_limits< double >::min()) const |
| Check equality.
|
|
|
std::istream & | operator>> (std::istream &in, angle_type &object) |
| Read pair of angles from input stream.
|
|
std::ostream & | operator<< (std::ostream &out, const angle_type &object) |
| Write pair of angles to output stream.
|
|
Auxiliary data structure for pair of angles.
Definition at line 184 of file JAstronomy.hh.
◆ angle_type() [1/2]
JASTRONOMY::angle_type::angle_type |
( |
| ) |
|
|
inlineprotected |
◆ angle_type() [2/2]
JASTRONOMY::angle_type::angle_type |
( |
const double | theta, |
|
|
const double | phi ) |
|
inlineprotected |
◆ equals()
bool JASTRONOMY::angle_type::equals |
( |
const angle_type & | angle, |
|
|
const double | precision = std::numeric_limits<double>::min() ) const |
|
inline |
Check equality.
- Parameters
-
angle | pair of angles |
precision | precision |
- 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 }
◆ operator>>
std::istream & operator>> |
( |
std::istream & | in, |
|
|
angle_type & | object ) |
|
friend |
Read pair of angles from input stream.
- Parameters
-
in | input stream |
object | pair of angles |
- Returns
- input stream
Definition at line 209 of file JAstronomy.hh.
210 {
211 return in >> object._theta_
212 >> object._phi_;
213 }
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const angle_type & | object ) |
|
friend |
Write pair of angles to output stream.
- Parameters
-
out | output stream |
object | pair of angles |
- Returns
- output stream
Definition at line 222 of file JAstronomy.hh.
223 {
224 return out <<
FIXED(12,7) <<
object._theta_ <<
' '
225 <<
FIXED(12,7) <<
object._phi_;
226 }
Auxiliary data structure for floating point format specification.
◆ _theta_
double JASTRONOMY::angle_type::_theta_ |
|
protected |
◆ _phi_
double JASTRONOMY::angle_type::_phi_ |
|
protected |
The documentation for this struct was generated from the following file: