19#ifndef ROOT_Math_GenVector_Polar2D
20#define ROOT_Math_GenVector_Polar2D 1
65 template <
class CoordSystem >
133 inline static double pi() {
return M_PI; }
176 template <
class CoordSystem >
196 T
x()
const {
return X();}
197 T
y()
const {
return Y();}
203#if defined(__MAKECINT__) || defined(G__DICTIONARY)
228#if defined(__MAKECINT__) || defined(G__DICTIONARY)
242#if defined(__MAKECINT__) || defined(G__DICTIONARY)
254 void Polar2D<T>::SetY(
Scalar a) {
255 GenVector_exception
e(
"Polar2D::SetY() is not supposed to be called");
257 Cartesian2D<Scalar>
v(*
this);
v.SetY(
a); *
this = Polar2D<Scalar>(
v);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint angle
Class describing a 2D cartesian coordinate system (x, y coordinates)
Class describing a polar 2D coordinate system based on r and phi Phi is restricted to be in the range...
void Negate()
negate the vector
void SetR(const T &r)
set the r coordinate value keeping phi constant
Polar2D()
Default constructor with r=1,phi=0.
void SetXY(Scalar a, Scalar b)
set all values using cartesian coordinates
void SetCoordinates(Scalar r, Scalar phi)
Set internal data based on 2 Scalar numbers.
void Scale(T a)
scale by a scalar quantity - for polar coordinates r changes
Polar2D(const Polar2D &v)
copy constructor
Polar2D & operator=(const Polar2D &v)
assignment operator
bool operator==(const Polar2D &rhs) const
Exact equality.
Polar2D(T r, T phi)
Construct from the polar coordinates: r and phi.
void Rotate(T angle)
rotate the vector
void SetPhi(const T &phi)
set the phi coordinate value keeping r constant
void GetCoordinates(Scalar &r, Scalar &phi) const
get internal data into 2 Scalar numbers
bool operator!=(const Polar2D &rhs) const
Polar2D(const CoordSystem &v)
Construct from any Vector or coordinate system implementing R() and Phi()
void Restrict()
restrict abgle hi to be between -PI and PI
Namespace for new Math classes and functions.
Rotation3D::Scalar Scalar
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.