Doxygen comments (#12)

- organized headers.
- added comments to headers.
- fixed a solver determinism bug.
- removed some un-used math functions
This commit is contained in:
Erin Catto 2026-06-10 13:21:14 -07:00 • committed by GitHub
commit d8fbeb444e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
53 changed files with 8973 additions and 1812 deletions

View file

@ -764,8 +764,11 @@ static void b3FinalizeBodiesTask( int startIndex, int endIndex, int workerIndex,
}
else if ( island->constraintRemoveCount > 0 )
{
// body wants to sleep but its island needs splitting first
if ( body->sleepTime > taskContext->splitSleepTime )
// Body wants to sleep but its island needs splitting first. Track the sleepiest candidate.
// Break sleep time ties using the island id to ensure determinism. The cross worker reduction
// breaks ties the same way.
if ( body->sleepTime > taskContext->splitSleepTime ||
( body->sleepTime == taskContext->splitSleepTime && body->islandId > taskContext->splitIslandId ) )
{
// pick the sleepiest candidate
taskContext->splitIslandId = body->islandId;