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

Commit 7d558a42 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix declination argument boundary checks" into main

parents 9bb8eb64 cc53d8d0
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");
        }