IntFloat32 Struct Reference

#include <intfloat.h>

Detailed Description

This structure is used to map an integer and a floating point value to the same memory location. A stucture is used since gcc outputs a warning if you do something like *((Int32*)&myFloat32Value).

Public Member Functions

 IntFloat32 ()=default
 
 IntFloat32 (Int32 a)
 
 IntFloat32 (UInt32 a)
 
 IntFloat32 (Float32 a)
 
const IntFloat32operator= (const IntFloat32 &other)
 
UInt32 GetUInt () const
 

Public Attributes

union {
   Int32   i
 
   Float32   f
 
}; 
 

Friends

Bool operator== (const IntFloat32 &a, const IntFloat32 &b)
 
Bool operator!= (const IntFloat32 &a, const IntFloat32 &b)
 

Constructor & Destructor Documentation

◆ IntFloat32() [1/4]

IntFloat32 ( )
default

◆ IntFloat32() [2/4]

IntFloat32 ( Int32  a)
explicit

◆ IntFloat32() [3/4]

IntFloat32 ( UInt32  a)
explicit

◆ IntFloat32() [4/4]

IntFloat32 ( Float32  a)
explicit

Member Function Documentation

◆ operator=()

const IntFloat32& operator= ( const IntFloat32 other)

◆ GetUInt()

UInt32 GetUInt ( ) const

Friends And Related Function Documentation

◆ operator==

Bool operator== ( const IntFloat32 a,
const IntFloat32 b 
)
friend

◆ operator!=

Bool operator!= ( const IntFloat32 a,
const IntFloat32 b 
)
friend

Member Data Documentation

◆ i

Int32 i

◆ f

◆ @1046

union { ... }