Avoid unnecessary copies after of mju_mulQuat.
Since fdbbc8bbe0, mju_mulQuat allows in-place computations.
There were a few places where the result was unnecessarily assigned to a temporary variable.
PiperOrigin-RevId: 477746005
Change-Id: I7351ef4796e7d70a4a54b930037bfaadee781f12
This commit is contained in:
committed by
Copybara-Service
parent
48f2ed99a5
commit
8a8305d3ca
@@ -240,9 +240,8 @@ void mju_quatIntegrate(mjtNum quat[4], const mjtNum vel[3], mjtNum scale) {
|
||||
mju_copy3(tmp, vel);
|
||||
angle = scale * mju_normalize3(tmp);
|
||||
mju_axisAngle2Quat(qrot, tmp, angle);
|
||||
mju_mulQuat(tmp, quat, qrot);
|
||||
mju_normalize4(tmp);
|
||||
mju_copy4(quat, tmp);
|
||||
mju_mulQuat(quat, quat, qrot);
|
||||
mju_normalize4(quat);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user