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

Sin.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: Sin.cc,v 1.5 2003/10/10 17:40:39 garren Exp $
5 #include <assert.h>
6 #include <cmath>
7 
8 namespace Genfun {
10 
11 Sin::Sin()
12 {}
13 
15 }
16 
17 Sin::Sin(const Sin & right) : AbsFunction(right)
18 { }
19 
20 
21 double Sin::operator() (double x) const {
22  return sin(x);
23 }
24 
25 
26 
27 Derivative Sin::partial(unsigned int index) const {
28  assert(index==0);
29  const AbsFunction & fPrime = Cos();
30  return Derivative(& fPrime);
31 }
32 
33 } // namespace Genfun