mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Enable the ESLint no-loss-of-precision
rule
Please refer to https://eslint.org/docs/rules/no-loss-of-precision
This commit is contained in:
parent
c47f5e81fe
commit
a54bed4963
3 changed files with 3 additions and 2 deletions
|
@ -947,7 +947,7 @@ const CalGrayCS = (function CalGrayCSClosure() {
|
|||
const L = cs.YW * AG;
|
||||
// http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html, Ch 4.
|
||||
// Convert values to rgb range [0, 255].
|
||||
const val = Math.max(295.8 * L ** 0.333333333333333333 - 40.8, 0);
|
||||
const val = Math.max(295.8 * L ** 0.3333333333333333 - 40.8, 0);
|
||||
dest[destOffset] = val;
|
||||
dest[destOffset + 1] = val;
|
||||
dest[destOffset + 2] = val;
|
||||
|
|
|
@ -1349,7 +1349,7 @@ class JpegImage {
|
|||
(0.00006834815998235662 * y +
|
||||
0.00015168452363460973 * k -
|
||||
0.09751927774728933) -
|
||||
k * (0.00031891311758832814 * k + 0.7364883807733168);
|
||||
k * (0.0003189131175883281 * k + 0.7364883807733168);
|
||||
|
||||
data[offset++] =
|
||||
255 +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue