CLHEP 2.0.4.7 Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: ATan.cc,v 1.4 2003/10/10 17:40:39 garren Exp $ 00003 #include "CLHEP/GenericFunctions/ATan.hh" 00004 #include "CLHEP/GenericFunctions/Square.hh" 00005 #include <assert.h> 00006 #include <cmath> // for atan() 00007 00008 namespace Genfun { 00009 FUNCTION_OBJECT_IMP(ATan) 00010 00011 ATan::ATan() 00012 {} 00013 00014 ATan::~ATan() { 00015 } 00016 00017 ATan::ATan(const ATan & right) 00018 { } 00019 00020 00021 double ATan::operator() (double x) const { 00022 return atan(x); 00023 } 00024 00025 00026 00027 Derivative ATan::partial(unsigned int index) const { 00028 assert(index==0); 00029 00030 Square square; 00031 00032 const AbsFunction & fPrime=1.0/(1.0+square);; 00033 return Derivative(& fPrime); 00034 } 00035 00036 } // end namespace Genfun