Fixes 'error C2124: divide or mod by zero' on msvc

This commit is contained in:
Fredrik Ovaska 2024-08-05 11:03:39 +02:00
parent 90eb50a3a5
commit 758e123ac0

View File

@ -160,8 +160,8 @@ void pk__add_module_math() {
py_newfloat(py_emplacedict(mod, py_name("pi")), 3.1415926535897932384);
py_newfloat(py_emplacedict(mod, py_name("e")), 2.7182818284590452354);
py_newfloat(py_emplacedict(mod, py_name("inf")), 1.0 / 0.0);
py_newfloat(py_emplacedict(mod, py_name("nan")), 0.0 / 0.0);
py_newfloat(py_emplacedict(mod, py_name("inf")), INFINITY);
py_newfloat(py_emplacedict(mod, py_name("nan")), NAN);
py_bindfunc(mod, "ceil", math_ceil);
py_bindfunc(mod, "fabs", math_fabs);