23 constexpr LABPixel(NumberT l = 0, NumberT a = 0, NumberT b = 0)
30 [[nodiscard]]
inline bool operator==(
const LABPixel& other)
const {
31 return l == other.l && a == other.a && b == other.b;
33 [[nodiscard]]
inline bool operator!=(
const LABPixel& other)
const {
34 return !(*
this == other);
38 inline void setGray(NumberT new_luma) {
45 static_cast<float>(a.l),
static_cast<float>(a.a),
static_cast<float>(a.b)};
47 static_cast<float>(b.l),
static_cast<float>(b.a),
static_cast<float>(b.b)};
49 (a.l - b.l) * (a.l - b.l) + (a.a - b.a) * (a.a - b.a) + (a.b - b.b) * (a.b - b.b)