Jpp
15.0.2
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JGeometry2D
JGeometry2DTestkit.hh
Go to the documentation of this file.
1
#ifndef __JGEOMETRY2DTESTKIT__
2
#define __JGEOMETRY2DTESTKIT__
3
4
#include "TRandom3.h"
5
6
#include "
JGeometry2D/JPosition2D.hh
"
7
#include "
JMath/JRandom.hh
"
8
#include "
JMath/JConstants.hh
"
9
10
/**
11
* \author mdejong
12
*/
13
14
namespace
JGEOMETRY2D {}
15
namespace
JPP {
using namespace
JGEOMETRY2D; }
16
17
namespace
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
JRandom.hh
Definition of random value generator.
JConstants.hh
Mathematical constants.
JMATH::PI
static const double PI
Mathematical constants.
Definition:
JMath/JConstants.hh:20
JGEOMETRY2D::JPosition2D
Data structure for position in two dimensions.
Definition:
JPosition2D.hh:31
JMATH::getRandom
T getRandom()
Get random value.
Definition:
JRandom.hh:113
randomize
void randomize(Vec *p)
Randomize 3D vector.
Definition:
JAAnetTestkit.hh:30
JPosition2D.hh
Generated by
1.8.5