34 public JMath<JAngle3D>
72 const double v = x*x + y*y + z*z;
217 const double precision = std::numeric_limits<double>::min())
const
287 out << format << angle.
getTheta() <<
' '
288 << format << angle.
getPhi();
JFormat_t & getFormat()
Get format for given type.
Base class for data structures with artithmetic capabilities.
Data structure for angles in three dimensions.
JAngle3D()
Default constructor.
JAngle3D & sub(const JAngle3D &angle)
Subtract angle.
double getDY() const
Get y direction.
friend std::ostream & operator<<(std::ostream &out, const JAngle3D &angle)
Write angle to output.
double getTheta() const
Get theta angle.
bool equals(const JAngle3D &angle, const double precision=std::numeric_limits< double >::min()) const
Check equality.
JAngle3D(const double x, const double y, const double z)
Constructor.
JAngle3D(const double theta, const double phi)
Constructor.
double getDot(const JAngle3D &angle) const
Get dot product.
JAngle3D & normalise()
Normalise angles.
friend std::istream & operator>>(std::istream &in, JAngle3D &angle)
Write angle from input.
double getPhi() const
Get phi angle.
friend JReader & operator>>(JReader &in, JAngle3D &angle)
Read angle from input.
double getDZ() const
Get z direction.
JAngle3D & mul(const double factor)
Scale angle.
double getDX() const
Get x direction.
JAngle3D & negate()
Negate angle.
JAngle3D & div(const double factor)
Scale angle.
friend JWriter & operator<<(JWriter &out, const JAngle3D &angle)
Write angle to output.
JAngle3D & add(const JAngle3D &angle)
Add angle.
Interface for binary input.
Interface for binary output.
Auxiliary classes and methods for 3D geometrical objects and operations.
static const double PI
Mathematical constants.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary base class for aritmetic operations of derived class types.