Tighten const qualifiers in collision functions.

PiperOrigin-RevId: 543789453
Change-Id: I929c68b9100a093738c0de6c0965dab4ded1084b
This commit is contained in:
Yuval Tassa
2023-06-27 10:42:12 -07:00
committed by Copybara-Service
parent b96532181c
commit bce2043762
5 changed files with 20 additions and 12 deletions
+2 -2
View File
@@ -353,12 +353,12 @@ int mjc_SphereCylinder(const mjModel* m, const mjData* d,
// cap collision: use plane-sphere
if (collide_cap) {
mjtNum flipmat[9] = {
const mjtNum flipmat[9] = {
-mat2[0], mat2[1], -mat2[2],
-mat2[3], mat2[4], -mat2[5],
-mat2[6], mat2[7], -mat2[8]
};
mjtNum* mat_cap;
const mjtNum* mat_cap;
mjtNum pos_cap[3];
if (x > 0) { // top cap
mju_addScl3(pos_cap, pos2, axis, height);