Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fada9e85 authored by James O'Leary's avatar James O'Leary
Browse files

Don't use pow for distance calculation

Bug: 186664313
Test: `mp droid`, verify wallpaper extraction continues to succeed
Change-Id: I8136522379abfe5cbce83beae904559e68725aca
parent a54b7154
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -62,6 +62,6 @@ public class LABCentroid implements CentroidProvider {
        double dL = a[0] - b[0];
        double dA = a[1] - b[1];
        double dB = a[2] - b[2];
        return (float) (Math.pow(dL, 2) + Math.pow(dA, 2) + Math.pow(dB, 2));
        return (float) (dL * dL + dA * dA + dB * dB);
    }
}