Doubles (#14)
Added a compile time option to use double precision body positions. Most math remains single precision with minimal performance loss. `BOX3D_DOUBLE_PRECISION` Improved accuracy of body inertia computation when shapes are far from the body origin. WARNING: several APIs changed but migration should be straight forward if doubles are not enabled.
This commit is contained in:
parent
a252f03b19
commit
09c65b08ea
115 changed files with 7591 additions and 5295 deletions
|
|
@ -14,8 +14,15 @@
|
|||
#define TracyCFrameMark
|
||||
#endif
|
||||
|
||||
#define EXPECTED_SLEEP_STEP 306
|
||||
#define EXPECTED_HASH 0x596EA165
|
||||
// Double precision accumulates body positions in double, so the settle/sleep step and the
|
||||
// state hash differ from the float build. Both modes are internally deterministic.
|
||||
#if defined( BOX3D_DOUBLE_PRECISION )
|
||||
#define EXPECTED_SLEEP_STEP 301
|
||||
#define EXPECTED_HASH 0xE4844A97
|
||||
#else
|
||||
#define EXPECTED_SLEEP_STEP 269
|
||||
#define EXPECTED_HASH 0x50313037
|
||||
#endif
|
||||
|
||||
static int SingleMultithreadingTest( int workerCount )
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue