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