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

Commit cc53d8d0 authored by Arthur Ishiguro's avatar Arthur Ishiguro
Browse files

Fix declination argument boundary checks

Fix according to WMM2020_D_MILL documentation.

Bug: 288980112
Test: Compile

Change-Id: I03e85af7e707e1737df2e0e04190b8922d9be836
parent 6c8fb011
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ public class SensorAdditionalInfo {
    public static SensorAdditionalInfo createLocalGeomagneticField(
            float strength, float declination, float inclination) {
        if (strength < 10 || strength > 100 // much beyond extreme values on earth
                || declination < 0 || declination > Math.PI
                || declination < -Math.PI / 2 || declination > Math.PI / 2
                || inclination < -Math.PI / 2 || inclination > Math.PI / 2) {
            throw new IllegalArgumentException("Geomagnetic field info out of range");
        }