CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
src
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
5
#include "
CLHEP/GenericFunctions/Tan.hh
"
6
#include "
CLHEP/GenericFunctions/Cos.hh
"
7
#include <assert.h>
8
#include <cmath>
9
10
namespace
Genfun {
11
FUNCTION_OBJECT_IMP
(Tan)
12
13
Tan
::
Tan
()
14
{}
15
16
Tan::~Tan
() {
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
Generated on Mon May 6 2013 04:04:11 for CLHEP by
1.8.1.2