Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit bcf0074

Browse files
committed
[[ Skia ]] Fix definition of NaN in Skia
This patch replaces a rather dubious 'convert from explicit bits' definition of a NaN, to using the NAN constant which emscripten does not like.
1 parent 80c6f1d commit bcf0074

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libskia/include/private/SkFloatingPoint.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ static inline float sk_float_pow(float base, float exp) {
9999
#define sk_double_round2int(x) (int)floor((x) + 0.5f)
100100
#define sk_double_ceil2int(x) (int)ceil(x)
101101

102-
static const uint32_t kIEEENotANumber = 0x7fffffff;
103-
#define SK_FloatNaN (*SkTCast<const float*>(&kIEEENotANumber))
102+
#define SK_FloatNaN (NAN)
104103
#define SK_FloatInfinity (+(float)INFINITY)
105104
#define SK_FloatNegativeInfinity (-(float)INFINITY)
106105

0 commit comments

Comments
 (0)