16#ifndef ROOT_MathX_GenVectorX_Cartesian2D
17#define ROOT_MathX_GenVectorX_Cartesian2D 1
43template <
class T =
double>
63 template <
class CoordSystem>
143 template <
class CoordSystem>
188#if defined(__ROOTCLING__) || defined(G__DICTIONARY)
210#if defined(__ROOTCLING__) || defined(G__DICTIONARY)
211#if !defined(ROOT_MATH_SYCL) && !defined(ROOT_MATH_CUDA)
Class describing a 2D cartesian coordinate system (x, y coordinates).
Cartesian2D & operator=(const Polar2D< T2 > &v)
void SetX(Scalar a)
set the x coordinate value keeping y constant
void SetY(Scalar a)
set the y coordinate value keeping x constant
T fX
(Contiguous) data containing the coordinates values x and y
Cartesian2D(const Polar2D< T2 > &v)
bool operator!=(const Cartesian2D &rhs) const
Cartesian2D & operator=(const CoordSystem &v)
Assignment from any class implementing x(),y() (can assign from any coordinate system).
void Rotate(Scalar angle)
rotate by an angle
void SetXY(Scalar xx, Scalar yy)
set all values using cartesian coordinates
bool operator==(const Cartesian2D &rhs) const
Exact equality.
void GetCoordinates(Scalar &xx, Scalar &yy) const
get internal data into 2 Scalar numbers
void Negate()
negate the vector
void Scale(Scalar a)
scale the vector by a scalar quantity a
constexpr Cartesian2D(const CoordSystem &v)
Construct from any Vector or coordinate system implementing X() and Y().
constexpr Cartesian2D() noexcept=default
Default constructor with x=y=0.
void SetCoordinates(Scalar xx, Scalar yy)
Set internal data based on 2 Scalar numbers.
Class describing a polar 2D coordinate system based on r and phi Phi is restricted to be in the range...
Scalar math_cos(Scalar x)
Rotation3D::Scalar Scalar
Scalar math_sqrt(Scalar x)
Scalar math_atan2(Scalar x, Scalar y)
Scalar math_sin(Scalar x)