mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-07 06:00:30 +00:00
Add my_isnanorinf.
This commit is contained in:
parent
21b63f56ff
commit
726471f665
@ -11,5 +11,5 @@
|
||||
#proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-17
|
||||
target=android-19
|
||||
android.library=true
|
||||
|
@ -105,6 +105,16 @@ inline bool my_isnan(float f) {
|
||||
return ((f2u.u & 0x7F800000) == 0x7F800000) && (f2u.u & 0x7FFFFF);
|
||||
}
|
||||
|
||||
inline bool my_isnanorinf(float f) {
|
||||
union {
|
||||
float f;
|
||||
uint32_t u;
|
||||
} f2u;
|
||||
f2u.f = f;
|
||||
// NaNs have non-zero mantissa, infs have zero mantissa. That is, we just ignore the mantissa here.
|
||||
return ((f2u.u & 0x7F800000) == 0x7F800000);
|
||||
}
|
||||
|
||||
inline int is_even(float d) {
|
||||
float int_part;
|
||||
modff(d / 2.0f, &int_part);
|
||||
|
Loading…
x
Reference in New Issue
Block a user