Skip to content

Commit 9b93e3f

Browse files
committed
Use __builtin_inff for GCC
1 parent 4f0255a commit 9b93e3f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include/FastNoise/Generators/Generator.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,12 @@ namespace FastNoise
7272
"Gradient Outer Product",
7373
};
7474

75-
static constexpr float kInfinity = (float)(1e+300 * 1e+300);
75+
static constexpr float kInfinity =
76+
#ifdef __GNUC__
77+
(float)(__builtin_inff ());
78+
#else
79+
(float)(1e+300 * 1e+300);
80+
#endif
7681

7782
struct OutputMinMax
7883
{

0 commit comments

Comments
 (0)