CLHEP VERSION Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: Cos.cc,v 1.5 2003/10/10 17:40:39 garren Exp $ 00003 #include "CLHEP/GenericFunctions/Cos.hh" 00004 #include "CLHEP/GenericFunctions/Sin.hh" 00005 #include <cmath> 00006 00007 namespace Genfun { 00008 FUNCTION_OBJECT_IMP(Cos) 00009 00010 Cos::Cos() 00011 {} 00012 00013 Cos::~Cos() { 00014 } 00015 00016 Cos::Cos(const Cos & right) : AbsFunction(right) 00017 { } 00018 00019 00020 double Cos::operator() (double x) const { 00021 return cos(x); 00022 } 00023 00024 00025 Derivative Cos::partial(unsigned int) const { 00026 const AbsFunction & fPrime = -Sin(); 00027 return Derivative(& fPrime); 00028 } 00029 00030 00031 } // namespace Genfun