|
arduino-audio-tools
|
A plain 32-bit float's bit pattern reinterpreted as a uint32_t, so instances can live in memory obtained from a capability-specific allocator (e.g. ESP32's MALLOC_CAP_32BIT, which some heap regions require for word-addressed access and won't necessarily hand out for a plain float array). Conversion to/from float is a zero-cost bitwise reinterpretation (see as_uint()/as_float()), not an encoding – unlike float16, this class is bit-for-bit identical to float and loses no precision or range; it exists purely to control storage/allocation, not to compress data.
More...
#include <float32.h>

Public Member Functions | |
| float32 ()=default | |
| float32 (const float32 &value) | |
| float32 (float value) | |
| operator double () | |
| operator float () const | |
| operator int () | |
| operator int () const | |
| bool | operator!= (float32 other) const |
| bool | operator< (float32 other) const |
| bool | operator<= (float32 other) const |
| bool | operator== (float32 other) const |
| bool | operator> (float32 other) const |
| bool | operator>= (float32 other) const |
Static Protected Member Functions | |
| static float | as_float (uint32_t x) |
| static uint32_t | as_uint (float x) |
Protected Attributes | |
| uint32_t | value =0 |
A plain 32-bit float's bit pattern reinterpreted as a uint32_t, so instances can live in memory obtained from a capability-specific allocator (e.g. ESP32's MALLOC_CAP_32BIT, which some heap regions require for word-addressed access and won't necessarily hand out for a plain float array). Conversion to/from float is a zero-cost bitwise reinterpretation (see as_uint()/as_float()), not an encoding – unlike float16, this class is bit-for-bit identical to float and loses no precision or range; it exists purely to control storage/allocation, not to compress data.
|
default |
|
inlineexplicit |
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
protected |