|
|
@ -364,7 +364,10 @@ var PDFFunction = (function PDFFunctionClosure() { |
|
|
|
var rmin = encode[2 * i]; |
|
|
|
var rmin = encode[2 * i]; |
|
|
|
var rmax = encode[2 * i + 1]; |
|
|
|
var rmax = encode[2 * i + 1]; |
|
|
|
|
|
|
|
|
|
|
|
tmpBuf[0] = rmin + (v - dmin) * (rmax - rmin) / (dmax - dmin); |
|
|
|
// Prevent the value from becoming NaN as a result
|
|
|
|
|
|
|
|
// of division by zero (fixes issue6113.pdf).
|
|
|
|
|
|
|
|
tmpBuf[0] = dmin === dmax ? rmin : |
|
|
|
|
|
|
|
rmin + (v - dmin) * (rmax - rmin) / (dmax - dmin); |
|
|
|
|
|
|
|
|
|
|
|
// call the appropriate function
|
|
|
|
// call the appropriate function
|
|
|
|
fns[i](tmpBuf, 0, dest, destOffset); |
|
|
|
fns[i](tmpBuf, 0, dest, destOffset); |
|
|
|