少年修仙传客户端基础资源
hch
2024-04-01 d01413b00ef631ac20347716b23818b0b811f65f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
 * \file
 */
 
#include "mono-math.h"
 
#ifndef HAVE_SIGNBIT
 
/**
 * mono_signbit_float:
 */
int
mono_signbit_float (float x)
{
    union { float f; int i; } u;
 
    u.f = x;
 
    return u.i < 0;
}
 
/**
 * mono_signbit_double:
 */
int
mono_signbit_double (double x)
{
    union { double d; int i[2]; } u;
 
    u.d = x;
 
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
    return u.i [1] < 0;
#else
    return u.i [0] < 0;
#endif
}
 
#endif