MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ to_word()

MAYAFLUX_API uint32_t MayaFlux::Kinesis::Discrete::to_word ( double  value,
uint32_t  bits 
)
noexcept

The offset binary word of a value, clamped to [-1, 1].

Parameters
bitsWord width, clamped to 1 to 24

Definition at line 16 of file Word.cpp.

17{
18 const double clamped = std::clamp(value, -1.0, 1.0);
19 return static_cast<uint32_t>(std::lrint((clamped + 1.0) * 0.5 * top(bits)));
20}
glm::vec3 value

References value.

Referenced by MayaFlux::Buffers::LogicProcessor::generate_planes().

+ Here is the caller graph for this function: