Decodes one sRGB-encoded component to linear-light (§60a).
The IEC 61966-2-1 piecewise function, extended to the whole real line by odd
symmetry (f(-x) = -f(x)) so an extended-range value survives a round trip
instead of being clamped — see the module header.
srgbToLinear(0); // 0 srgbToLinear(1); // 1 srgbToLinear(0.5); // 0.21404114048223255 — mid sRGB is not mid linear
A non-finite argument is returned unchanged (NaN in, NaN out): §85's
finite check belongs to whatever authored the value, and a transfer function
that threw would put the check in the hot path.
Decodes one sRGB-encoded component to linear-light (§60a).
The IEC 61966-2-1 piecewise function, extended to the whole real line by odd symmetry (
f(-x) = -f(x)) so an extended-range value survives a round trip instead of being clamped — see the module header.A non-finite argument is returned unchanged (
NaNin,NaNout): §85's finite check belongs to whatever authored the value, and a transfer function that threw would put the check in the hot path.