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
|
|
@ -105,6 +105,15 @@ b3Version b3GetVersion( void )
|
|||
return (b3Version){ 0, 2, 0 };
|
||||
}
|
||||
|
||||
bool b3IsDoublePrecision( void )
|
||||
{
|
||||
#if defined( BOX3D_DOUBLE_PRECISION )
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static b3AllocFcn* b3_allocFcn = NULL;
|
||||
static b3FreeFcn* b3_freeFcn = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue