I tried this, unfortunately when I replace all floats with double even native version does not work, physics is broken. Maybe I made mistake somewhere, I will try again.
2017-07-27 22:53 GMT+07:00 Alon Zakai <[email protected]>: > There isn't an option for that currently. But in your specific case, I think > if you make box2d use doubles instead of floats, it should be identical, > since the issue is only with floats. > > On Thu, Jul 27, 2017 at 4:02 AM, caiiiycuk <[email protected]> wrote: >> >> Hi. Is it possible to enable precies float computation for a part of code. >> I use box2d and it works incorrect in PRECISE_F32=0 mode. For each frame >> native version makes 1-5 physics steps, but js version makes 100-200 steps. >> But if I set PRECISE_F32=1 then both versions works identically. I guess >> that problem is in b2World::Solve function, maybe some corner cases do not >> work as expected because of rounding errors. I want to compile only this >> function/ or all box2d functions with PRECISE_F32=1, but rest of project >> with PRECISE_F32=0. Is it possible? Or maybe I can easily rewrite C++ part >> to avoid rounding errors? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
