make FloatSwap less ugly
This commit is contained in:
1 parent
3973f4aaa2
commit
4fb1caf6bd
1 file changed
+2
-3
@@ -180,11 +180,10 @@ typedef union {
|
|||||||
} _FloatByteUnion;
|
} _FloatByteUnion;
|
||||||
|
|
||||||
float FloatSwap (const float *f) {
|
float FloatSwap (const float *f) {
|
||||||
const _FloatByteUnion *in;
|
|
||||||
_FloatByteUnion out;
|
_FloatByteUnion out;
|
||||||
|
|
||||||
in = (_FloatByteUnion *)f;
|
out.f = *f;
|
||||||
out.i = LongSwap(in->i);
|
out.i = LongSwap(out.i);
|
||||||
|
|
||||||
return out.f;
|
return out.f;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user