Simplified ordering check

This commit is contained in:
Fabian Löschner 2019-08-13 09:27:24 +02:00 committed by Sébastien Crozet
parent a06b833343
commit e170729f67
1 changed files with 1 additions and 3 deletions

View File

@ -876,10 +876,8 @@ impl<N: Scalar, R: Dim, C: Dim, S: Storage<N, R, C>> Matrix<N, R, C, S> {
for e in iter { for e in iter {
let ae = abs(*e); let ae = abs(*e);
if let Some(ae_ordering) = ae.partial_cmp(&max) { if ae.partial_cmp(&max) == Some(ordering) {
if ae_ordering == ordering {
max = ae; max = ae;
}
} }
} }