CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
src
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
Mod.hh
Genfun::AbsFunction
Definition:
CLHEP/GenericFunctions/AbsFunction.hh:48
Genfun::Mod::Mod
Mod(double y)
Definition:
Mod.cc:9
Genfun::Mod
Definition:
CLHEP/GenericFunctions/Mod.hh:19
Genfun::Mod::~Mod
virtual ~Mod()
Definition:
Mod.cc:17
FUNCTION_OBJECT_IMP
#define FUNCTION_OBJECT_IMP(classname)
Definition:
CLHEP/GenericFunctions/AbsFunction.hh:156
Genfun
Definition:
CLHEP/GenericFunctions/Abs.hh:14
Genfun::Mod::operator()
virtual double operator()(double argument) const
Definition:
Mod.cc:26
Generated by
1.8.9.1