LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
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) {}
bool val

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: