rapier icon indicating copy to clipboard operation
rapier copied to clipboard

`RevoluteJoint::angle()` occasionally incorrectly returns `NaN`

Open chrisdunelm opened this issue 1 year ago • 0 comments

As far as I can see in my use-case, this is due to numeric imprecision which causes the i value of the ang_err quaternion to be marginally outside the range -1.0 to 1.0; which in turn causes i.asin() to return NaN.

A simple fix is to clamp the value passed to i.asin() to force it to the range -1.0 to 1.0

chrisdunelm avatar Sep 21 '24 17:09 chrisdunelm