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
@ -71,6 +71,7 @@
|
||||
"no-inner-declarations": ["error", "functions"],
|
||||
"no-invalid-regexp": "error",
|
||||
"no-irregular-whitespace": "error",
|
||||
"no-loss-of-precision": "error",
|
||||
"no-obj-calls": "error",
|
||||
"no-promise-executor-return": "error",
|
||||
"no-regex-spaces": "error",
|
||||
|
@ -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…
Reference in New Issue
Block a user