@@ -28,7 +28,8 @@ function wrap180(deg) {
28
28
return deg ;
29
29
}
30
30
31
- /* is sector a full circle?
31
+ /**
32
+ * is sector a full circle?
32
33
* ... this comes up a lot in SVG path-drawing routines
33
34
*
34
35
* @param {2-item array } sector sector angles in *degrees*
@@ -39,8 +40,8 @@ function isFullCircle(sector) {
39
40
return arc === 360 ;
40
41
}
41
42
42
- /* angular delta between angle 'a' and 'b'
43
- *
43
+ /**
44
+ * angular delta between angle 'a' and 'b'
44
45
* solution taken from: https://stackoverflow.com/a/2007279
45
46
*
46
47
* @param {number } a : first angle in *radians*
@@ -52,7 +53,8 @@ function angleDelta(a, b) {
52
53
return Math . atan2 ( Math . sin ( d ) , Math . cos ( d ) ) ;
53
54
}
54
55
55
- /* angular distance between angle 'a' and 'b'
56
+ /**
57
+ * angular distance between angle 'a' and 'b'
56
58
*
57
59
* @param {number } a : first angle in *radians*
58
60
* @param {number } b : second angle in *radians*
@@ -62,7 +64,8 @@ function angleDist(a, b) {
62
64
return Math . abs ( angleDelta ( a , b ) ) ;
63
65
}
64
66
65
- /* is angle inside sector?
67
+ /**
68
+ * is angle inside sector?
66
69
*
67
70
* @param {number } a : angle to test in *radians*
68
71
* @param {2-item array } sector : sector angles in *degrees*
@@ -91,7 +94,8 @@ function isAngleInsideSector(a, sector) {
91
94
return ( a0 >= s0 && a0 <= s1 ) || ( a1 >= s0 && a1 <= s1 ) ;
92
95
}
93
96
94
- /* is pt (r,a) inside sector?
97
+ /**
98
+ * is pt (r,a) inside sector?
95
99
*
96
100
* @param {number } r : pt's radial coordinate
97
101
* @param {number } a : pt's angular coordinate in *radians*
@@ -187,7 +191,8 @@ function _path(r0, r1, a0, a1, cx, cy, isClosed) {
187
191
return p ;
188
192
}
189
193
190
- /* path an arc
194
+ /**
195
+ * path an arc
191
196
*
192
197
* @param {number } r : radius
193
198
* @param {number } a0 : first angular coordinate
@@ -200,7 +205,8 @@ function pathArc(r, a0, a1, cx, cy) {
200
205
return _path ( null , r , a0 , a1 , cx , cy , 0 ) ;
201
206
}
202
207
203
- /* path a sector
208
+ /**
209
+ * path a sector
204
210
*
205
211
* @param {number } r : radius
206
212
* @param {number } a0 : first angular coordinate
@@ -213,7 +219,8 @@ function pathSector(r, a0, a1, cx, cy) {
213
219
return _path ( null , r , a0 , a1 , cx , cy , 1 ) ;
214
220
}
215
221
216
- /* path an annulus
222
+ /**
223
+ * path an annulus
217
224
*
218
225
* @param {number } r0 : first radial coordinate
219
226
* @param {number } r1 : second radial coordinate
0 commit comments