From 6d6c5f94ccd94564177014ec5b494674d3edb1f1 Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Mon, 10 Oct 2011 22:35:17 -0500 Subject: [PATCH] Fixing interpolation function (#549) --- pdf.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdf.js b/pdf.js index 847ed2ff4..79310b149 100644 --- a/pdf.js +++ b/pdf.js @@ -6797,11 +6797,11 @@ var PDFFunction = (function pdfFunction() { diff.push(c1[i] - c0[i]); this.func = function pdfFunctionConstructInterpolatedFunc(args) { - var x = args[0]; + var x = n == 1 ? args[0] : Math.pow(args[0], n); var out = []; for (var j = 0; j < length; ++j) - out.push(c0[j] + (x^n * diff[i])); + out.push(c0[j] + (x * diff[j])); return out; };