LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
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: