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

◆ from_word()

MAYAFLUX_API double MayaFlux::Kinesis::Discrete::from_word ( uint32_t  word,
uint32_t  bits 
)
noexcept

The value of an offset binary word; bits above the width are ignored.

Parameters
bitsWord width, clamped to 1 to 24

Definition at line 22 of file Word.cpp.

23{
24 const double highest = top(bits);
25 const auto masked = static_cast<double>(word & static_cast<uint32_t>(highest));
26 return masked / highest * 2.0 - 1.0;
27}

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

+ Here is the caller graph for this function: