1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-23 08:38:06 +02:00

Change the getB function, in src/core/pattern.js, to use the exponentiation operator

This commit is contained in:
Jonas Jenwald 2023-09-15 11:46:00 +02:00
parent 8d695c982f
commit 93ce7c5a89

View file

@ -418,12 +418,7 @@ const getB = (function getBClosure() {
const t = i / count,
t_ = 1 - t;
lut.push(
new Float32Array([
t_ * t_ * t_,
3 * t * t_ * t_,
3 * t * t * t_,
t * t * t,
])
new Float32Array([t_ ** 3, 3 * t * t_ ** 2, 3 * t ** 2 * t_, t ** 3])
);
}
return lut;