We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8745dbb commit bedf32eCopy full SHA for bedf32e
css-color-hdr/Overview.bs
@@ -555,8 +555,11 @@ Predefined color spaces for HDR: {#predefined-HDR}
555
const a = 0.17883277;
556
const b = 0.28466892; // 1 - (4 * a)
557
const c = 0.55991073; // 0.5 - a * Math.log(4 *a)
558
- if (E <= 1/12) {
559
- Edash = Math.sqrt( 3 * E);
+ // handle negative values
+ var sign = E < 0? -1 : 1;
560
+ var abs = Math.abs(E);
561
+ if (abs <= 1/12) {
562
+ Edash = sign * Math.sqrt( 3 * abs);
563
}
564
else {
565
Edash = a * Math.log(12 * E - b) + c;
0 commit comments