34 public JMath<JAngle3D>
72 const double v =
x*
x +
y*
y + z*z;
217 const double precision = std::numeric_limits<double>::min())
const
285 const JFormat format(out, getFormat<JAngle3D>(
JFormat_t(9, 5, std::ios::fixed | std::ios::showpos)));
287 out << format << angle.
getTheta() <<
' '
288 << format << angle.
getPhi();
Base class for data structures with artithmetic capabilities.
Data structure for angles in three dimensions.
JAngle3D()
Default constructor.
friend JWriter & operator<<(JWriter &out, const JAngle3D &angle)
Write angle to output.
friend std::istream & operator>>(std::istream &in, JAngle3D &angle)
Write angle from input.
JAngle3D & mul(const double factor)
Scale angle.
JAngle3D & normalise()
Normalise angles.
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.
JAngle3D & negate()
Negate angle.
double getDot(const JAngle3D &angle) const
Get dot product.
JAngle3D & sub(const JAngle3D &angle)
Subtract angle.
JAngle3D & div(const double factor)
Scale angle.
double getPhi() const
Get phi angle.
JAngle3D & add(const JAngle3D &angle)
Add angle.
double getDZ() const
Get z direction.
double getDX() const
Get x direction.
friend JReader & operator>>(JReader &in, JAngle3D &angle)
Read angle from input.
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.