make FloatSwap less ugly

This commit is contained in:
Ludwig Nussel 2005-08-30 15:36:17 +00:00
parent 3973f4aaa2
commit 4fb1caf6bd
1 changed files with 2 additions and 3 deletions

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;
}