11#include "../utility/utility.hpp"
12#include "../macros.hpp"
18hi_export_module(hikogui.image.snorm_r8);
22[[
nodiscard]]
constexpr int8_t make_snorm_r8_value(
float rhs)
noexcept
41 explicit snorm_r8(
float rhs) noexcept : value(make_snorm_r8_value(rhs)) {}
43 snorm_r8 &operator=(
float rhs)
noexcept
45 value = make_snorm_r8_value(rhs);
49 explicit operator float()
const noexcept
51 return narrow_cast<float>(value) / 127.0f;
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:378
1 x int8_t pixel format.
Definition snorm_r8.hpp:31