Skip to content

Commit b35912d

Browse files
Increase invSqrt accuracy
1 parent 016d742 commit b35912d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/MadgwickAHRS.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ float Madgwick::invSqrt(float x) {
225225
i = 0x5f3759df - (i>>1);
226226
y = *(float*)&i;
227227
y = y * (1.5f - (halfx * y * y));
228+
y = y * (1.5f - (halfx * y * y));
228229
return y;
229230
}
230231

0 commit comments

Comments
 (0)