1 // Macro for killing denormalled numbers
3 // Written by Jezar at Dreampoint, June 2000
4 // http://www.dreampoint.co.uk
5 // Based on IS_DENORMAL macro by Jon Watte
6 // This code is public domain
12 #define undenormalise(sample) \
13 if(((*(unsigned int*)&sample)&0x7f800000)==0) sample=0.0f
16 static inline void undenormalise(float &sample) {
17 union { float f; unsigned int u; } v; v.f = sample;
18 if( !(v.u & 0x7f800000) ) sample=0.f;