2 #include "AudioConfig.h"
16 this->value = float32::as_uint(value);
19 this->value = value.value;
21 inline operator float() {
22 return as_float(value);
24 explicit inline operator double() {
25 return (
double) float32::as_float(value);
27 explicit inline operator int() {
28 return (
int) float32::as_float(value);
30 explicit inline operator int()
const {
31 return (
int) float32::as_float(value);
33 inline bool operator< (
float32 other)
const{
34 return float() < (float)other;
36 inline bool operator<= (
float32 other)
const{
37 return float() <= (float)other;
39 inline bool operator> (
float32 other)
const{
40 return float() > (float)other;
42 inline bool operator>= (
float32 other)
const{
43 return float() >= (float)other;
45 inline bool operator== (
float32 other)
const{
46 return float() == (float)other;
48 inline bool operator!= (
float32 other)
const{
49 return float() != (float)other;
55 static uint32_t as_uint(
float x) {
56 return *(uint32_t*)&x;
58 static float as_float(uint32_t x) {
66 return (
float)one + (float)two;
68 inline float operator- (float32 one, float32 two)
70 return (
float)one - (float)two;
72 inline float operator* (float32 one, float32 two)
74 return (
float)one * (float)two;
76 inline float operator/ (float32 one, float32 two)
78 return (
float)one / (float)two;
80 inline float operator+ (float32 one,
float two)
82 return (
float)one + two;
84 inline float operator- (float32 one,
float two)
86 return (
float)one - two;
88 inline float operator* (float32 one,
float two)
90 return (
float)one * two;
92 inline float operator/ (float32 one,
float two)
94 return (
float)one / two;
96 inline float operator+ (
float one, float32 two)
98 return two + float(one);
100 inline float operator- (
float one, float32 two)
102 return two - float(one);
104 inline float operator* (
float one, float32 two)
106 return two * float(one);
108 inline float operator/ (
float one, float32 two)
110 return two / float(one);
117 inline float floor ( float32 arg ) {
return std::floor((
float)arg);}
118 inline float fabs ( float32 arg ) {
return std::fabs((
float)arg);}