7 #include "GeoGenericFunctions/Abs.h"
8 #include "GeoGenericFunctions/Sin.h"
9 #include "GeoGenericFunctions/Cos.h"
10 #include "GeoGenericFunctions/ATan.h"
11 #include "GeoGenericFunctions/Rectangular.h"
12 #include "GeoGenericFunctions/Mod.h"
16 GeoGenfun::FunctionNoop
LArGeo::Fx(
double r, GeoGenfun::GENFUNCTION
G,
const double Cenx[],
const double Ceny[] )
20 int i = (
int)rint(
r-.1), j = (
int)rint(
r+.1) ;
21 GeoGenfun::GENFUNCTION
result = (Cos(
G)*(Cenx[
i]+Cenx[j])/2-Sin(
G)*(Ceny[
i]+Ceny[j])/2) ;
25 GeoGenfun::FunctionNoop
LArGeo::Fy(
double r, GeoGenfun::GENFUNCTION
G,
const double Cenx[],
const double Ceny[] )
29 int i = (
int)rint(
r-.1), j = (
int)rint(
r+.1) ;
30 GeoGenfun::GENFUNCTION
result = (Sin(
G)*(Cenx[
i]+Cenx[j])/2+Cos(
G)*(Ceny[
i]+Ceny[j])/2) ;
38 GeoGenfun::GENFUNCTION
result = (Cos(
G ) * Sin(
G ) );
45 GeoGenfun::GENFUNCTION
result = (Cos(
G ) * Cos(
G ) );
50 GeoGenfun::FunctionNoop
LArGeo::ATan2(GeoGenfun::GENFUNCTION
y, GeoGenfun::GENFUNCTION
x)
53 GeoGenfun::Rectangular Theta;
54 Theta.x0().setValue(0.0);
55 Theta.x1().setValue(DBL_MAX);
56 Theta.baseline().setValue(0.0);
57 Theta.height().setValue(1.0);
64 GeoGenfun::Mod Mod2Pi(2*
M_PI);
68 GeoGenfun::GENFUNCTION
result = Theta(
x)*ATan(
y/
x) + Theta(-
x)*(Mod2Pi(ATan(
y/
x)+
M_PI));