Codechange: Define sequential operators for ZoomLevel.
This commit is contained in:
@@ -271,6 +271,12 @@ constexpr bool IsInsideMM(const size_t x, const size_t min, const size_t max) no
|
||||
|
||||
constexpr bool IsInsideMM(const ConvertibleThroughBase auto x, const size_t min, const size_t max) noexcept { return IsInsideMM(x.base(), min, max); }
|
||||
|
||||
template <typename enum_type, std::enable_if_t<std::is_enum_v<enum_type>, bool> = true>
|
||||
constexpr bool IsInsideMM(enum_type x, enum_type min, enum_type max) noexcept
|
||||
{
|
||||
return IsInsideMM(to_underlying(x), to_underlying(min), to_underlying(max));
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a "fract" value 0..255 to "percent" value 0..100
|
||||
* @param i value to convert, range 0..255
|
||||
|
||||
Reference in New Issue
Block a user