Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JGeometry2DTestkit.hh
Go to the documentation of this file.
1#ifndef __JGEOMETRY2DTESTKIT__
2#define __JGEOMETRY2DTESTKIT__
3
4#include "TRandom3.h"
5
7#include "JMath/JRandom.hh"
8#include "JMath/JConstants.hh"
9
10/**
11 * \author mdejong
12 */
13
14namespace JGEOMETRY2D {}
15namespace JPP { using namespace JGEOMETRY2D; }
16
17namespace JGEOMETRY2D {
18
19 using JMATH::PI;
20 using JMATH::getRandom;
21
22
23 /**
24 * Randomize position.
25 *
26 * \param p pointer to valid object
27 */
28 inline void randomize(JPosition2D* p)
29 {
30 new (p) JPosition2D(getRandom<double>(-1.0, +1.0),
31 getRandom<double>(-1.0, +1.0));
32 };
33}
34
35#endif
Mathematical constants.
Definition of random value generator.
Data structure for position in two dimensions.
Auxiliary classes and methods for 2D geometrical objects and operations.
Definition JAngle2D.hh:19
void randomize(JPosition2D *p)
Randomize position.
T getRandom()
Get random value.
static const double PI
Mathematical constants.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).