16#ifndef ROOT_Math_GenVector_Cartesian2D
17#define ROOT_Math_GenVector_Cartesian2D 1
38template <
class T =
double>
61 template <
class CoordSystem>
142 template <
class CoordSystem>
153 return fX == rhs.
fX &&
fY == rhs.
fY;
173 fX =
r * cos(
v.Phi());
175 fY =
r * sin(
v.Phi());
187 fX =
r * cos(
v.Phi());
189 fY =
r * sin(
v.Phi());
195#if defined(__MAKECINT__) || defined(G__DICTIONARY)
222#if defined(__MAKECINT__) || defined(G__DICTIONARY)
237 void Cartesian2D<T>::SetR(
Scalar r) {
238 GenVector_exception
e(
"Cartesian2D::SetR() is not supposed to be called");
240 Polar2D<Scalar>
v(*
this);
v.SetR(
r); *
this = Cartesian2D<Scalar>(
v);
245 void Cartesian2D<T>::SetPhi(
Scalar phi) {
246 GenVector_exception
e(
"Cartesian2D::SetPhi() is not supposed to be called");
248 Polar2D<Scalar>
v(*
this);
v.SetPhi(phi); *
this = Cartesian2D<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)
void SetX(Scalar a)
set the x coordinate value keeping y constant
bool operator!=(const Cartesian2D &rhs) const
bool operator==(const Cartesian2D &rhs) const
Exact equality.
void Scale(Scalar a)
scale the vector by a scalar quantity a
void Negate()
negate the vector
void SetY(Scalar a)
set the y coordinate value keeping x constant
void SetXY(Scalar xx, Scalar yy)
set all values using cartesian coordinates
Cartesian2D(const Cartesian2D &v)
copy constructor
Cartesian2D()
Default constructor with x=y=0.
static constexpr unsigned int Dimension
Cartesian2D & operator=(const Cartesian2D &v)
assignment operator
void GetCoordinates(Scalar &xx, Scalar &yy) const
get internal data into 2 Scalar numbers
constexpr Cartesian2D(const CoordSystem &v)
Construct from any Vector or coordinate system implementing X() and Y()
constexpr Cartesian2D(const Polar2D< T2 > &v)
void SetCoordinates(Scalar xx, Scalar yy)
Set internal data based on 2 Scalar numbers.
T fX
(Contiguous) data containing the coordinates values x and y
void Rotate(Scalar angle)
rotate by an angle
Cartesian2D(Scalar xx, Scalar yy)
Constructor from x,y coordinates.
Class describing a polar 2D coordinate system based on r and phi Phi is restricted to be in the range...
Namespace for new Math classes and functions.
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
Rotation3D::Scalar Scalar
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...