LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
Public Member Functions | Private Attributes | Friends | List of all members
lsst::afw::geom::AngleUnit Class Reference

A class used to convert scalar POD types such as double to Angle. More...

#include <Angle.h>

Public Member Functions

 AngleUnit (double val)
 
bool operator== (AngleUnit const &rhs) const
 

Private Attributes

double _val
 

Friends

class Angle
 
template<typename T >
const Angle operator* (T lhs, AngleUnit const rhs)
 Use AngleUnit to convert a POD (e.g. int, double) to an Angle; e.g. 180*afwGeomdegrees. More...
 

Detailed Description

A class used to convert scalar POD types such as double to Angle.

For example:

* Angle pi = 180*degrees;
*

is equivalent to

* Angle pi(180, degrees);
*

Definition at line 71 of file Angle.h.

Constructor & Destructor Documentation

lsst::afw::geom::AngleUnit::AngleUnit ( double  val)
inlineexplicit

Definition at line 75 of file Angle.h.

75 : _val(val) {}
ImageT val
Definition: CR.cc:154

Member Function Documentation

bool lsst::afw::geom::AngleUnit::operator== ( AngleUnit const &  rhs) const
inline

Definition at line 82 of file Angle.h.

82  {
83  return (_val == rhs._val);
84 }

Friends And Related Function Documentation

friend class Angle
friend

Definition at line 72 of file Angle.h.

template<typename T >
const Angle operator* ( lhs,
AngleUnit const  rhs 
)
friend

Use AngleUnit to convert a POD (e.g. int, double) to an Angle; e.g. 180*afwGeomdegrees.

Parameters
lhsthe value to convert
rhsthe conversion coefficient

Definition at line 304 of file Angle.h.

306  {
307  BOOST_STATIC_ASSERT_MSG(std::numeric_limits<T>::is_specialized,
308  "Only numeric types may be converted to Angles using degrees/radians!");
309  return Angle(lhs*rhs._val);
310 }
friend class Angle
Definition: Angle.h:72

Member Data Documentation

double lsst::afw::geom::AngleUnit::_val
private

Definition at line 79 of file Angle.h.


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