mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix another false-ish positive
This commit is contained in:
parent
dd4c8617e2
commit
496f14c4f5
1 changed files with 2 additions and 10 deletions
|
@ -9,18 +9,10 @@
|
||||||
|
|
||||||
typedef unsigned short float16;
|
typedef unsigned short float16;
|
||||||
|
|
||||||
// This ain't a 1.5.10 float16, it's a stupid hack format where we chop 16 bits off a float.
|
|
||||||
// This choice is subject to change. Don't think I'm using this for anything at all now anyway.
|
|
||||||
// DEPRECATED
|
|
||||||
inline float16 FloatToFloat16(float x) {
|
|
||||||
int ix;
|
|
||||||
memcpy(&ix, &x, sizeof(float));
|
|
||||||
return ix >> 16;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline float Float16ToFloat(float16 ix) {
|
inline float Float16ToFloat(float16 ix) {
|
||||||
|
uint32_t extended = ix;
|
||||||
float x;
|
float x;
|
||||||
memcpy(&x, &ix, sizeof(float));
|
memcpy(&x, &extended, sizeof(float));
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue