CLHEP
2.4.6.4
C++ Class Library for High Energy Physics
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
m
n
o
p
q
r
s
t
v
w
z
Functions
b
c
d
e
f
g
h
i
m
n
o
p
q
r
s
t
v
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
a
b
c
e
f
i
j
m
n
o
r
s
t
u
v
w
x
y
z
Related Functions
b
c
d
h
i
o
p
q
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
Variables
m
n
q
r
t
Typedefs
Enumerator
Macros
_
a
c
d
e
f
h
m
n
p
r
s
t
v
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Loading...
Searching...
No Matches
Mod.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id:
3
#include "CLHEP/GenericFunctions/Mod.hh"
4
#include <cmath>
5
#include <limits.h>
6
namespace
Genfun
{
7
FUNCTION_OBJECT_IMP
(Mod)
8
9
Mod
::
Mod
(
double
y):
10
_y(y)
11
{}
12
13
Mod::Mod
(
const
Mod
& right)
14
:
AbsFunction
(right), _y(right._y)
15
{}
16
17
Mod::~Mod
() {
18
}
19
20
21
// HAD BEEN:
22
// double Mod::operator() (double x) const {
23
// return drem_local(x-_y/2.0,_y) + _y/2.0;
24
//}
25
26
double
Mod::operator()
(
double
x)
const
{
27
return
(x - _y*floor(x/_y));
28
}
29
30
}
// namespace Genfun
FUNCTION_OBJECT_IMP
#define FUNCTION_OBJECT_IMP(classname)
Definition:
AbsFunction.hh:149
Genfun::AbsFunction
Definition:
AbsFunction.hh:48
Genfun::Mod
Definition:
Mod.hh:19
Genfun::Mod::~Mod
virtual ~Mod()
Definition:
Mod.cc:17
Genfun::Mod::Mod
Mod(double y)
Definition:
Mod.cc:9
Genfun::Mod::operator()
virtual double operator()(double argument) const override
Definition:
Mod.cc:26
Genfun
Definition:
Abs.hh:14
CLHEP-CLHEP_2_4_6_4
GenericFunctions
src
Mod.cc
Generated by
1.9.6