Unified · Split
| @@ -35,11 +35,11 @@ · 34 unmodified lines | |||
| 35 | #include "chuck_compile.h" | 35 | #include "chuck_compile.h" |
| 36 | #include "util_math.h" | 36 | #include "util_math.h" |
| 37 | 37 | ||
| 38 | #include <limits.h> | ||
| 39 | #include <float.h> | 38 | #include <float.h> |
| 40 | #include <stdlib.h> | 39 | #include <stdlib.h> |
| 41 | #include <time.h> | 40 | #include <time.h> |
| 42 | 41 | ||
| 42 | #include <limits> | ||
| 43 | #include <vector> // 1.5.0.0 (ge) | added | 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 | QUERY->doc_var( QUERY, "Largest representable integer value." ); | 470 | QUERY->doc_var( QUERY, "Largest representable integer value." ); |
| 471 | 471 | ||
| 472 | // infinity, using function to avoid potential "smart" compiler warning | 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 | QUERY->add_svar( QUERY, "float", "INFINITY", TRUE, &g_inf ); | 476 | QUERY->add_svar( QUERY, "float", "INFINITY", TRUE, &g_inf ); |
| 475 | QUERY->doc_var( QUERY, "Like, infinity." ); | 477 | QUERY->doc_var( QUERY, "Like, infinity." ); |
| 476 | 478 | ||