We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d24e58 commit f5e1adcCopy full SHA for f5e1adc
src/mavextra/mymavextra.js
@@ -20,5 +20,29 @@ window.angle_diff = (angle1, angle2) => {
20
return ret
21
}
22
23
+// eslint-disable-next-line camelcase
24
+window.wrap_360 = (angle) => {
25
+ let ret = angle
26
+ if (ret > 360) {
27
+ ret -= 360
28
+ }
29
+ if (ret < 0) {
30
+ ret += 360
31
32
+ return ret
33
+}
34
+
35
36
+window.wrap_180 = (angle) => {
37
38
+ if (ret > 180) {
39
40
41
+ if (ret < -180) {
42
43
44
45
46
47
window.min = Math.min
48
window.max = Math.max
0 commit comments