make FloatSwap less ugly

This commit is contained in:
Ludwig Nussel 2005-08-30 15:36:17 +00:00
parent 3973f4aaa2
commit 4fb1caf6bd

View file

@ -180,11 +180,10 @@ typedef union {
} _FloatByteUnion;
float FloatSwap (const float *f) {
const _FloatByteUnion *in;
_FloatByteUnion out;
in = (_FloatByteUnion *)f;
out.i = LongSwap(in->i);
out.f = *f;
out.i = LongSwap(out.i);
return out.f;
}