tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
saturate_cast.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  etl
 

Functions

template<builtin_integer To, builtin_integer From>
constexpr auto saturate_cast (From x) noexcept -> To
 Converts the value x to a value of type T, clamping x between the minimum and maximum values of type T.