arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
audio_tools::float16 Class Reference

Stores float values with 2 bytes. More...

#include <Float16.h>

Public Member Functions

 float16 (const float16 &value16)
 
 float16 (float value)
 
 operator double ()
 
 operator float ()
 
 operator int ()
 
 operator int () const
 
bool operator!= (float16 other) const
 
bool operator< (float16 other) const
 
bool operator<= (float16 other) const
 
bool operator== (float16 other) const
 
bool operator> (float16 other) const
 
bool operator>= (float16 other) const
 

Static Protected Member Functions

static float as_float (const uint32_t x)
 see https://stackoverflow.com/questions/1659440/32-bit-to-16-bit-floating-point-conversion
 
static uint32_t as_uint (const float x)
 see https://stackoverflow.com/questions/1659440/32-bit-to-16-bit-floating-point-conversion
 
static uint16_t float_to_half (const float x)
 see https://stackoverflow.com/questions/1659440/32-bit-to-16-bit-floating-point-conversion
 
static float half_to_float (const uint16_t x)
 see https://stackoverflow.com/questions/1659440/32-bit-to-16-bit-floating-point-conversion
 

Protected Attributes

uint16_t value =0
 

Detailed Description

Stores float values with 2 bytes.

Author
Phil Schatzmann

The documentation for this class was generated from the following file: