started working on no negative clipping

This commit is contained in:
Alberto Griggio
2018-02-19 16:31:30 +01:00
parent b37c94298c
commit 33e0c28789
6 changed files with 57 additions and 27 deletions

View File

@@ -141,7 +141,7 @@ constexpr std::uint8_t uint16ToUint8Rounded(std::uint16_t i)
template <typename T>
constexpr bool OOG(const T &val, const T &high=T(MAXVAL))
{
return (val > high);
return (val < T(0)) || (val > high);
}
template <typename T>