Fix oct_distance return value.

PiperOrigin-RevId: 792924045
Change-Id: I42b8d0adaae7282d5c4e787fd1c85162720e977b
This commit is contained in:
Alessio Quaglino
2025-08-09 00:32:26 -07:00
committed by Copybara-Service
parent ed3ff15870
commit ca4ca173ab
+1 -1
View File
@@ -157,7 +157,7 @@ mjtNum oct_distance(const mjModel* m, const mjtNum p[3], int meshid) {
for (int i = 0; i < 8; ++i) {
sdf += w[i] * oct_coeff[8*node + i];
}
return sdf + boxDist > 0 ? sdf + boxDist : sdf;
return boxDist > 0 ? sdf + boxDist : sdf;
}
// gradient of sdf