Skip to content

Commit 54752af

Browse files
Charly-sketchnedseb
authored andcommitted
lis2mdl: fix exemple point to north
1 parent 66a5dfa commit 54752af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/lis2mdl/exemple/magnet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
y_c = (y - y_off) / scale
3737

3838
# heading (adjust the sign according to your reference if needed)
39-
angle = math.degrees(math.atan2(y_c, x_c))
39+
angle = math.degrees(math.atan2(x_c,y_c))
4040
if angle < 0:
4141
angle += 360
4242

0 commit comments

Comments
 (0)