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

Tan.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: Tan.cc,v 1.4 2003/10/10 17:40:39 garren Exp $
3 // ---------------------------------------------------------------------------
4 
7 #include <assert.h>
8 #include <cmath>
9 
10 namespace Genfun {
12 
13 Tan::Tan()
14 {}
15 
17 }
18 
19 Tan::Tan(const Tan & right) : AbsFunction(right)
20 { }
21 
22 
23 double Tan::operator() (double x) const {
24  return tan(x);
25 }
26 
27 
28 
29 Derivative Tan::partial(unsigned int index) const {
30  assert(index==0);
31  const AbsFunction & fPrime = 1.0/Cos()/Cos();
32  return Derivative(& fPrime);
33 }
34 
35 } // namespace Genfun
virtual double operator()(double argument) const
Definition: Tan.cc:23
virtual ~Tan()
Definition: Tan.cc:16
Derivative partial(unsigned int) const
Definition: Tan.cc:29
#define FUNCTION_OBJECT_IMP(classname)
Tan()
Definition: Tan.cc:13