http://www.ph.ed.ac.uk/%7ewjh/teaching/mo/slides/lens/lens.pdf.
*/
if (x == 0.0)
- return(0.25*MagickPIL);
- return(BesselOrderOne(MagickPIL*x)/(x+x));
+ return((MagickRealType) (0.25*MagickPIL));
+ return(BesselOrderOne((MagickRealType) (MagickPIL*x))/(x+x));
}
static MagickRealType Blackman(const MagickRealType x,
Refactored by Chantal Racette and Nicolas Robidoux to one trig
call and five flops.
*/
- const double pix = MagickPIL*x;
+ const double pix = (double) (MagickPIL*x);
const MagickRealType cospix = cos(pix);
return(0.34+cospix*(0.5+cospix*0.16));
}
Bohman: 2rd Order cosine windowing function:
(1-x) cos(pi x) + sin(pi x) / pi.
*/
- const double pix = MagickPIL*x;
- return((1-x)*cos(pix)+(1.0/MagickPIL)*sin(pix));
+ const double pix = (double) (MagickPIL*x);
+ return((MagickRealType) ((1-x)*cos(pix)+(1.0/MagickPIL)*sin(pix)));
}
static MagickRealType Box(const MagickRealType magick_unused(x),
1D Gaussian with sigm=1/2
exp(-2 x^2)/sqrt(pi/2))
*/
- const MagickRealType alpha = 2.0/MagickSQ2PI;
+ const MagickRealType alpha = (MagickRealType) (2.0/MagickSQ2PI);
return(exp(-(double)(2.0*x*x))*alpha);
}
/*
Cosine window function: .5 + .5 cos(pi x).
*/
- const double pix = MagickPIL*x;
+ const double pix = (double) (MagickPIL*x);
const MagickRealType cospix = cos(pix);
return(0.5+0.5*cospix);
}
/*
Offset cosine window function: .54 + .46 cos(pi x).
*/
- const double pix = MagickPIL*x;
+ const double pix = (double) (MagickPIL*x);
const MagickRealType cospix = cos(pix);
return(0.54+0.46*cospix);
}
if (x == 0.0)
return(1.0);
{
- const MagickRealType pix = MagickPIL*x;
+ const MagickRealType pix = (MagickRealType) (MagickPIL*x);
const MagickRealType sinpix = sin((double) pix);
return(sinpix/pix);
}
const MagickRealType xx = x*x;
if (xx > 16.0)
{
- const MagickRealType pix = MagickPIL*x;
+ const MagickRealType pix = (MagickRealType) (MagickPIL*x);
const MagickRealType sinpix = sin((double) pix);
return(sinpix/pix);
}