10namespace hi::inline
v1 {
12[[nodiscard]]
constexpr int8_t make_snorm_r8_value(
float rhs)
noexcept
14 return narrow_cast<int8_t>(
std::round(std::clamp(rhs, -1.0f, 1.0f) * 127.0f));
27 explicit snorm_r8(
float rhs) noexcept : value(make_snorm_r8_value(rhs)) {}
29 snorm_r8 &operator=(
float rhs)
noexcept
31 value = make_snorm_r8_value(rhs);
35 explicit operator float()
const noexcept
37 return narrow_cast<float>(value) / 127.0f;
DOXYGEN BUG.
Definition algorithm.hpp:15
Definition snorm_r8.hpp:17