mirror of
https://github.com/janet-lang/janet
synced 2024-11-25 09:47:17 +00:00
Fix windows build issues.
This commit is contained in:
parent
894877a0e3
commit
2e6ee39506
@ -21,6 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef JANET_AMALG
|
#ifndef JANET_AMALG
|
||||||
|
#include <math.h>
|
||||||
#include <janet.h>
|
#include <janet.h>
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#endif
|
#endif
|
||||||
@ -184,7 +185,7 @@ void janet_memempty(JanetKV *mem, int32_t count) {
|
|||||||
|
|
||||||
Janet janet_wrap_number_safe(double d) {
|
Janet janet_wrap_number_safe(double d) {
|
||||||
Janet ret;
|
Janet ret;
|
||||||
ret.number = isnan(d) ? (0.0 / 0.0) : d;
|
ret.number = isnan(d) ? NAN : d;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,8 +230,7 @@ Janet janet_wrap_number(double x) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Janet janet_wrap_number_safe(double d) {
|
Janet janet_wrap_number_safe(double d) {
|
||||||
Janet ret;
|
double x = isnan(d) ? NAN : d;
|
||||||
double x = isnan(d) ? (0.0 / 0.0) : d;
|
|
||||||
return janet_wrap_number(x);
|
return janet_wrap_number(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user