|
From: <kin...@us...> - 2004-02-19 06:55:26
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16501/nrrd Modified Files: winKernel.c Log Message: going crazy: replaced M_E with AIR_E and M_PI with AIR_PI, out of spite for windows Index: winKernel.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/winKernel.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** winKernel.c 7 Jan 2004 15:34:30 -0000 1.8 --- winKernel.c 19 Feb 2004 06:45:12 -0000 1.9 *************** *** 20,24 **** #include "nrrd.h" ! #define _SINC(x) (sin(M_PI*x)/(M_PI*x)) double --- 20,24 ---- #include "nrrd.h" ! #define _SINC(x) (sin(AIR_PI*x)/(AIR_PI*x)) double *************** *** 100,106 **** (x > R ? 0 : (x < -R ? 0 : (\ (x < R/50000 && x > -R/50000) \ ! ? 1.1 - x*x*(M_PI*M_PI*(3 + 2*R*R)/(12*R*R) \ ! + M_PI*M_PI*M_PI*M_PI*(5 + 2*R*R*(5 + 2*R*R))*x*x/(240*R*R*R*R)) \ ! : (1 + cos(M_PI*x/R))*_SINC(x)/2) \ )) --- 100,106 ---- (x > R ? 0 : (x < -R ? 0 : (\ (x < R/50000 && x > -R/50000) \ ! ? 1.1 - x*x*(AIR_PI*AIR_PI*(3 + 2*R*R)/(12*R*R) \ ! + AIR_PI*AIR_PI*AIR_PI*AIR_PI*(5 + 2*R*R*(5 + 2*R*R))*x*x/(240*R*R*R*R)) \ ! : (1 + cos(AIR_PI*x/R))*_SINC(x)/2) \ )) *************** *** 124,130 **** (x > R ? 0.0 : (x < -R ? 0.0 : ( \ (x < R/50000 && x > -R/50000) \ ! ? -x*M_PI*M_PI*(3 + 2*R*R)/(6*R*R) \ ! : ((R*(1 + cos(M_PI*x/R))*(M_PI*x*cos(M_PI*x) - sin(M_PI*x)) \ ! - M_PI*x*sin(M_PI*x)*sin(M_PI*x/R))/(2*R*M_PI*x*x)) \ ))) --- 124,130 ---- (x > R ? 0.0 : (x < -R ? 0.0 : ( \ (x < R/50000 && x > -R/50000) \ ! ? -x*AIR_PI*AIR_PI*(3 + 2*R*R)/(6*R*R) \ ! : ((R*(1 + cos(AIR_PI*x/R))*(AIR_PI*x*cos(AIR_PI*x) - sin(AIR_PI*x)) \ ! - AIR_PI*x*sin(AIR_PI*x)*sin(AIR_PI*x/R))/(2*R*AIR_PI*x*x)) \ ))) *************** *** 146,159 **** #define _DDHANN_A(x, R) \ ! (2*M_PI*R*cos(M_PI*x)*(R + R*cos(M_PI*x/R) + M_PI*x*sin(M_PI*x/R))) #define _DDHANN_B(x, R) \ ! (cos(M_PI*x/R)*(M_PI*M_PI*x*x + R*R*(M_PI*M_PI*x*x - 2)) + \ ! R*(R*(M_PI*M_PI*x*x - 2) - 2*M_PI*x*sin(M_PI*x/R))) #define _DDHANN(x, R) \ (x > R ? 0 : (x < -R ? 0 : ( \ (x < R/50000 && x > -R/50000) \ ! ? (M_PI*M_PI/(2*R*R))*( -(3 + 2*R*R)/3 \ ! + M_PI*M_PI*(5 + 2*R*R*(5 + R*R))*x*x/(10*R*R)) \ ! : -(_DDHANN_A(x,R) + sin(M_PI*x)*_DDHANN_B(x,R)/x)/(2*M_PI*R*R*x*x) \ ))) --- 146,159 ---- #define _DDHANN_A(x, R) \ ! (2*AIR_PI*R*cos(AIR_PI*x)*(R + R*cos(AIR_PI*x/R) + AIR_PI*x*sin(AIR_PI*x/R))) #define _DDHANN_B(x, R) \ ! (cos(AIR_PI*x/R)*(AIR_PI*AIR_PI*x*x + R*R*(AIR_PI*AIR_PI*x*x - 2)) + \ ! R*(R*(AIR_PI*AIR_PI*x*x - 2) - 2*AIR_PI*x*sin(AIR_PI*x/R))) #define _DDHANN(x, R) \ (x > R ? 0 : (x < -R ? 0 : ( \ (x < R/50000 && x > -R/50000) \ ! ? (AIR_PI*AIR_PI/(2*R*R))*( -(3 + 2*R*R)/3 \ ! + AIR_PI*AIR_PI*(5 + 2*R*R*(5 + R*R))*x*x/(10*R*R)) \ ! : -(_DDHANN_A(x,R) + sin(AIR_PI*x)*_DDHANN_B(x,R)/x)/(2*AIR_PI*R*R*x*x) \ ))) *************** *** 178,182 **** (x < R/50000 && x > -R/50000) \ ? 1.0 - x*x*(1.6449340668482264 + 4.046537804446637/(R*R)) \ ! : (0.42 + cos(M_PI*x/R)/2 + 0.08*cos(2*M_PI*x/R))*_SINC(x) \ ))) --- 178,182 ---- (x < R/50000 && x > -R/50000) \ ? 1.0 - x*x*(1.6449340668482264 + 4.046537804446637/(R*R)) \ ! : (0.42 + cos(AIR_PI*x/R)/2 + 0.08*cos(2*AIR_PI*x/R))*_SINC(x) \ ))) *************** *** 198,211 **** #define _DBLACK_A(x, R) \ ! R*x*cos(M_PI*x)*(2.638937829015426 + M_PI*cos(M_PI*x/R) \ ! + 0.5026548245743669*cos(2*M_PI*x/R)) #define _DBLACK_B(x, R) \ ! sin(M_PI*x)*(-0.84*R - R*cos(M_PI*x/R) - 0.16*R*cos(2*M_PI*x/R) - \ ! M_PI*x*sin(M_PI*x/R) - 1.0053096491487339*x*sin(2*M_PI*x/R)) #define _DBLACK(x, R) \ (x > R ? 0.0 : (x < -R ? 0.0 : ( \ (x < R/50000 && x > -R/50000) \ ? -x*(3.289868133696453 + 8.093075608893272/(R*R)) \ ! : (_DBLACK_A(x,R) + _DBLACK_B(x,R))/(2*M_PI*R*x*x) \ ))) --- 198,211 ---- #define _DBLACK_A(x, R) \ ! R*x*cos(AIR_PI*x)*(2.638937829015426 + AIR_PI*cos(AIR_PI*x/R) \ ! + 0.5026548245743669*cos(2*AIR_PI*x/R)) #define _DBLACK_B(x, R) \ ! sin(AIR_PI*x)*(-0.84*R - R*cos(AIR_PI*x/R) - 0.16*R*cos(2*AIR_PI*x/R) - \ ! AIR_PI*x*sin(AIR_PI*x/R) - 1.0053096491487339*x*sin(2*AIR_PI*x/R)) #define _DBLACK(x, R) \ (x > R ? 0.0 : (x < -R ? 0.0 : ( \ (x < R/50000 && x > -R/50000) \ ? -x*(3.289868133696453 + 8.093075608893272/(R*R)) \ ! : (_DBLACK_A(x,R) + _DBLACK_B(x,R))/(2*AIR_PI*R*x*x) \ ))) *************** *** 231,245 **** ? (-(3.289868133696453 + 8.093075608893272/(R*R)) \ + x*x*(9.7409091034 + 86.694091020262/(R*R*R*R) + 79.8754546479/(R*R))) \ ! : ((R*x*cos(M_PI*x)*(-2.638937829015426*R - M_PI*R*cos((M_PI*x)/R) \ ! - 0.5026548245743669*R*cos((2*M_PI*x)/R) \ ! - M_PI*M_PI*x*sin((M_PI*x)/R) \ ! - 3.158273408348595*x*sin((2*M_PI*x)/R)) \ ! + sin(M_PI*x)*((-4.934802200544679*x*x \ ! + R*R*(1 - 4.934802200544679*x*x))*cos((M_PI*x)/R) \ + (-3.158273408348595*x*x \ ! + R*R*(0.16 - 0.7895683520871487*x*x))*cos((2*M_PI*x)/R) \ + R*(0.84*R - 4.14523384845753*R*x*x \ ! + M_PI*x*sin((M_PI*x)/R) \ ! + 1.0053096491487339*x*sin((2*M_PI*x)/R))))/(M_PI*R*R*x*x*x)) \ ))) --- 231,245 ---- ? (-(3.289868133696453 + 8.093075608893272/(R*R)) \ + x*x*(9.7409091034 + 86.694091020262/(R*R*R*R) + 79.8754546479/(R*R))) \ ! : ((R*x*cos(AIR_PI*x)*(-2.638937829015426*R - AIR_PI*R*cos((AIR_PI*x)/R) \ ! - 0.5026548245743669*R*cos((2*AIR_PI*x)/R) \ ! - AIR_PI*AIR_PI*x*sin((AIR_PI*x)/R) \ ! - 3.158273408348595*x*sin((2*AIR_PI*x)/R)) \ ! + sin(AIR_PI*x)*((-4.934802200544679*x*x \ ! + R*R*(1 - 4.934802200544679*x*x))*cos((AIR_PI*x)/R) \ + (-3.158273408348595*x*x \ ! + R*R*(0.16 - 0.7895683520871487*x*x))*cos((2*AIR_PI*x)/R) \ + R*(0.84*R - 4.14523384845753*R*x*x \ ! + AIR_PI*x*sin((AIR_PI*x)/R) \ ! + 1.0053096491487339*x*sin((2*AIR_PI*x)/R))))/(AIR_PI*R*R*x*x*x)) \ ))) |