Skip to content

Commit

Permalink
matrix_alg: Probable redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
Julio Cesar Matias authored and rmackay9 committed Mar 2, 2025
1 parent d24da9e commit 076951f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions libraries/AP_Math/matrix_alg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,8 @@ static void mat_pivot(const T* A, T* pivot, uint16_t n)
for(uint16_t i = 0;i < n; i++) {
uint16_t max_j = i;
for(uint16_t j=i;j<n;j++){
if (std::is_same<T, double>::value) {
if(fabsF(A[j*n + i]) > fabsF(A[max_j*n + i])) {
max_j = j;
}
} else {
if(fabsF(A[j*n + i]) > fabsF(A[max_j*n + i])) {
max_j = j;
}
if(fabsF(A[j*n + i]) > fabsF(A[max_j*n + i])) {
max_j = j;
}
}

Expand Down

0 comments on commit 076951f

Please sign in to comment.