Skip to content

Commit 076951f

Browse files
Julio Cesar Matiasrmackay9
authored andcommitted
matrix_alg: Probable redundancy
1 parent d24da9e commit 076951f

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

libraries/AP_Math/matrix_alg.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,8 @@ static void mat_pivot(const T* A, T* pivot, uint16_t n)
7777
for(uint16_t i = 0;i < n; i++) {
7878
uint16_t max_j = i;
7979
for(uint16_t j=i;j<n;j++){
80-
if (std::is_same<T, double>::value) {
81-
if(fabsF(A[j*n + i]) > fabsF(A[max_j*n + i])) {
82-
max_j = j;
83-
}
84-
} else {
85-
if(fabsF(A[j*n + i]) > fabsF(A[max_j*n + i])) {
86-
max_j = j;
87-
}
80+
if(fabsF(A[j*n + i]) > fabsF(A[max_j*n + i])) {
81+
max_j = j;
8882
}
8983
}
9084

0 commit comments

Comments
 (0)