19#ifndef ROOT_MathX_GenVectorX_Polar2D
20#define ROOT_MathX_GenVectorX_Polar2D 1
66 template <
class CoordSystem>
119 inline static double pi() {
return M_PI; }
162 template <
class CoordSystem>
180 T
x()
const {
return X(); }
181 T
y()
const {
return Y(); }
187#if defined(__MAKECINT__) || defined(G__DICTIONARY)
210#if defined(__MAKECINT__) || defined(G__DICTIONARY)
224#if defined(__MAKECINT__) || defined(G__DICTIONARY)
225#if !defined(ROOT_MATH_SYCL) && !defined(ROOT_MATH_CUDA)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 polar 2D coordinate system based on r and phi Phi is restricted to be in the range...
void SetXY(Scalar a, Scalar b)
set all values using cartesian coordinates
void Scale(T a)
scale by a scalar quantity - for polar coordinates r changes
void GetCoordinates(Scalar &r, Scalar &phi) const
get internal data into 2 Scalar numbers
bool operator!=(const Polar2D &rhs) const
void Rotate(T angle)
rotate the vector
void SetR(const T &r)
set the r coordinate value keeping phi constant
Polar2D & operator=(const CoordSystem &c)
generic assignment operator from any coordinate system
void Negate()
negate the vector
bool operator==(const Polar2D &rhs) const
Exact equality.
void SetPhi(const T &phi)
set the phi coordinate value keeping r constant
void SetCoordinates(Scalar r, Scalar phi)
Set internal data based on 2 Scalar numbers.
constexpr 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
constexpr Polar2D() noexcept=default
Default constructor with r=1,phi=0.
Scalar math_floor(Scalar x)
Scalar math_cos(Scalar x)
Scalar math_sin(Scalar x)