Avoid square root in mju_makeFrame

PiperOrigin-RevId: 745974380
Change-Id: I90879fac05e62daf60acd2223f814e833634b242
This commit is contained in:
Yuval Tassa
2025-04-10 04:40:21 -07:00
committed by Copybara-Service
parent 3429a4881a
commit d3664b5d01
+1 -1
View File
@@ -532,7 +532,7 @@ void mju_makeFrame(mjtNum frame[9]) {
}
// if yaxis undefined, set yaxis to (0,1,0) if possible, otherwise (0,0,1)
if (mju_norm3(frame+3) < 0.5) {
if (mju_dot3(frame+3, frame+3) < 0.25) {
mju_zero3(frame+3);
if (frame[1] < 0.5 && frame[1] > -0.5) {