inGamut function
Whether c lies in the sRGB gamut, with tolerance eps.
Implementation
bool inGamut(LinRgb c, [double eps = 1e-9]) =>
c.$1 >= -eps &&
c.$1 <= 1 + eps &&
c.$2 >= -eps &&
c.$2 <= 1 + eps &&
c.$3 >= -eps &&
c.$3 <= 1 + eps;