Skip to content

Commit b5b6e9d

Browse files
committed
[css-color-hdr] Add missing signed power function
1 parent bc3af3a commit b5b6e9d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

css-color-hdr-1/rec2100-hlg.js

+5
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,9 @@ function hlg_decode(RGB) {
5151
}
5252
return ((Math.exp((val - c) / a) + b) / 12) * scale;
5353
});
54+
}
55+
56+
function spow (base, exp) {
57+
let sign = base < 0? -1 : 1;
58+
return sign * (Math.abs(base) ** exp);
5459
}

0 commit comments

Comments
 (0)