mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-02-18 01:51:15 +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;
|
} _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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue