-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve math::AreAutoDiffVecXdEqual (#19393)
Previously, it was possible that ExtractGradient (and therefore AreAutoDiffVecXdEqual) would throw, when this method should simply return false. Now we handle the case where the elements of the vector could have a different number of derivative values. This version should also be slightly faster. N.B. This came up for me because I had two different constraints setting values in a shared Context, but one was calling SetPositions(), and the other was calling SetPositionsAndVelocities().
- Loading branch information
1 parent
ec2ee07
commit 8ecb82d
Showing
2 changed files
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters