Showing the changes to src (1 of 1 file). Show all
Unified · Split
| @@ -35,11 +35,11 @@ · 34 unmodified lines | ||
| 35 | 35 | #include "chuck_compile.h" |
| 36 | 36 | #include "util_math.h" |
| 37 | 37 | |
| 38 | −#include <limits.h> | |
| 39 | 38 | #include <float.h> |
| 40 | 39 | #include <stdlib.h> |
| 41 | 40 | #include <time.h> |
| 42 | 41 | |
| 42 | +#include <limits> | |
| 43 | 43 | #include <vector> // 1.5.0.0 (ge) | added |
| 44 | 44 | |
| 45 | 45 | |
| @@ -470,7 +470,9 @@ DLL_QUERY libmath_query( Chuck_DL_Query * QUERY ) · 424 unmodified lines | ||
| 470 | 470 | QUERY->doc_var( QUERY, "Largest representable integer value." ); |
| 471 | 471 | |
| 472 | 472 | // infinity, using function to avoid potential "smart" compiler warning |
| 473 | − g_inf = 1.0 / fzero(); | |
| 473 | + // g_inf = 1.0 / fzero(); | |
| 474 | + // 1.5.0.0 (ge) | updated to use limits | |
| 475 | + g_inf = std::numeric_limits<t_CKFLOAT>::infinity(); | |
| 474 | 476 | QUERY->add_svar( QUERY, "float", "INFINITY", TRUE, &g_inf ); |
| 475 | 477 | QUERY->doc_var( QUERY, "Like, infinity." ); |
| 476 | 478 | |