Add equality op that compares against a clamped integer
This commit is contained in:
parent
35521c25c0
commit
43aacc13d9
|
@ -270,6 +270,11 @@ struct NormValue
|
||||||
norm = unNorm / 255.0;
|
norm = unNorm / 255.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool operator ==(int value) const
|
||||||
|
{
|
||||||
|
return unNorm == clamp(value, 0, 255);
|
||||||
|
}
|
||||||
|
|
||||||
operator int() const
|
operator int() const
|
||||||
{
|
{
|
||||||
return unNorm;
|
return unNorm;
|
||||||
|
|
Loading…
Reference in New Issue