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

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