mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
Add equality op that compares against a clamped integer
This commit is contained in:
parent
35521c25c0
commit
43aacc13d9
1 changed files with 5 additions and 0 deletions
|
|
@ -270,6 +270,11 @@ struct NormValue
|
|||
norm = unNorm / 255.0;
|
||||
}
|
||||
|
||||
bool operator ==(int value) const
|
||||
{
|
||||
return unNorm == clamp(value, 0, 255);
|
||||
}
|
||||
|
||||
operator int() const
|
||||
{
|
||||
return unNorm;
|
||||
|
|
|
|||
Loading…
Reference in a new issue