mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-25 13:31:10 +00:00
make FloatSwap less ugly
This commit is contained in:
parent
3973f4aaa2
commit
4fb1caf6bd
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue