CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

Mod.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: 
00003 #include "CLHEP/GenericFunctions/Mod.hh"
00004 #include <cmath>
00005 #include <limits.h>
00006 namespace Genfun {
00007 FUNCTION_OBJECT_IMP(Mod)
00008 
00009 Mod::Mod(double y):
00010     _y(y)
00011 {}
00012 
00013 Mod::Mod(const Mod & right)
00014   : AbsFunction(right), _y(right._y)
00015 {}
00016 
00017 Mod::~Mod() {
00018 }
00019 
00020 
00021 // HAD BEEN:
00022 // double Mod::operator() (double x) const {
00023 //  return drem_local(x-_y/2.0,_y) + _y/2.0;
00024 //}
00025 
00026 double Mod::operator() (double x) const {
00027   return (x - _y*floor(x/_y));
00028 }
00029 
00030 } // namespace Genfun

Generated on 15 Nov 2012 for CLHEP by  doxygen 1.4.7