Skip to content

Small correctness fixes - #419

Open
FastestMolasses wants to merge 2 commits into
bepu:masterfrom
FastestMolasses:correctness-fixes
Open

Small correctness fixes#419
FastestMolasses wants to merge 2 commits into
bepu:masterfrom
FastestMolasses:correctness-fixes

Conversation

@FastestMolasses

Copy link
Copy Markdown
Contributor

No description provided.

var bestIndex0 = 0;
//While depth is the dominant heuristic, extremity is used as a bias to keep initial contact selection a little more consistent in near-equal cases.
var extremityScale = epsilonScale * 1e-2f;
const float extremityScale = 1e-2f;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was in reference to a similar change in the file from this commit:
9cdaaff#diff-7493f9e331a5a9f0e17ecccad6862552a08b6a55acbf485f2115ae38b679e0e2R191

Seems there were 2 cases of this in the file

{
Array.Resize(ref topLevelMatrix[i], newSize);
for (int j = oldSize; j < newSize; ++j)
for (int j = i < oldSize ? oldSize : 0; j < newSize; ++j)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously newly added rows get default initialized to have TaskIndex = 0 instead of TaskIndex = -1

rayHitHandler.OnRayHit(*ray, ref *maximumT, t, normal, 0);
}
}
break;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this single threaded branch, we already compute all ray sources

}
}
//Regardless of why the loop stopped (capacity, node count, or a small node), everything before nodeIndex has been handled as isolated nodes.
var earlyIsolatedNodeIntervalEnd = nodeIndex;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

earlyIsolatedNodeIntervalEnd stays at 0 if the for loop conditions terminates the loop so we move i outside the loop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant