Improve AABB bounds in makeAAMM.

MODEL           BEFORE(ns)   AFTER(ns)
boxmesh.xml     874645       744822
box.xml         808226       786226
ellipsoid.xml   1477609      1436058
mixed.xml       1492063      1404848

PiperOrigin-RevId: 900626282
Change-Id: I3df5a6cd8a4cb2e3b9ded1b40a5310a4c14ec624
This commit is contained in:
Kyle Bayes
2026-04-16 03:24:28 -07:00
committed by Copybara-Service
parent 5a0809efaf
commit 56e98cc16c
3 changed files with 43 additions and 16 deletions
+2 -10
View File
@@ -1304,21 +1304,13 @@ void mju_printMatSparse(const mjtNum* mat, int nr,
// min function, avoid re-evaluation
mjtNum mju_min(mjtNum a, mjtNum b) {
if (a <= b) {
return a;
} else {
return b;
}
return a <= b ? a : b;
}
// max function, avoid re-evaluation
mjtNum mju_max(mjtNum a, mjtNum b) {
if (a >= b) {
return a;
} else {
return b;
}
return a >= b ? a : b;
}