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

Commit 6a68f4c1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix declination argument boundary checks" into main am: 7d558a42 am: ba5ca297

parents 0a658aab ba5ca297
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");
        }