Skip to content

Commit 296f088

Browse files
committed
fixup jsDoc header
1 parent 6b5895f commit 296f088

File tree

3 files changed

+26
-14
lines changed

3 files changed

+26
-14
lines changed

src/lib/angles.js

+16-9
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ function wrap180(deg) {
2828
return deg;
2929
}
3030

31-
/* is sector a full circle?
31+
/**
32+
* is sector a full circle?
3233
* ... this comes up a lot in SVG path-drawing routines
3334
*
3435
* @param {2-item array} sector sector angles in *degrees*
@@ -39,8 +40,8 @@ function isFullCircle(sector) {
3940
return arc === 360;
4041
}
4142

42-
/* angular delta between angle 'a' and 'b'
43-
*
43+
/**
44+
* angular delta between angle 'a' and 'b'
4445
* solution taken from: https://stackoverflow.com/a/2007279
4546
*
4647
* @param {number} a : first angle in *radians*
@@ -52,7 +53,8 @@ function angleDelta(a, b) {
5253
return Math.atan2(Math.sin(d), Math.cos(d));
5354
}
5455

55-
/* angular distance between angle 'a' and 'b'
56+
/**
57+
* angular distance between angle 'a' and 'b'
5658
*
5759
* @param {number} a : first angle in *radians*
5860
* @param {number} b : second angle in *radians*
@@ -62,7 +64,8 @@ function angleDist(a, b) {
6264
return Math.abs(angleDelta(a, b));
6365
}
6466

65-
/* is angle inside sector?
67+
/**
68+
* is angle inside sector?
6669
*
6770
* @param {number} a : angle to test in *radians*
6871
* @param {2-item array} sector : sector angles in *degrees*
@@ -91,7 +94,8 @@ function isAngleInsideSector(a, sector) {
9194
return (a0 >= s0 && a0 <= s1) || (a1 >= s0 && a1 <= s1);
9295
}
9396

94-
/* is pt (r,a) inside sector?
97+
/**
98+
* is pt (r,a) inside sector?
9599
*
96100
* @param {number} r : pt's radial coordinate
97101
* @param {number} a : pt's angular coordinate in *radians*
@@ -187,7 +191,8 @@ function _path(r0, r1, a0, a1, cx, cy, isClosed) {
187191
return p;
188192
}
189193

190-
/* path an arc
194+
/**
195+
* path an arc
191196
*
192197
* @param {number} r : radius
193198
* @param {number} a0 : first angular coordinate
@@ -200,7 +205,8 @@ function pathArc(r, a0, a1, cx, cy) {
200205
return _path(null, r, a0, a1, cx, cy, 0);
201206
}
202207

203-
/* path a sector
208+
/**
209+
* path a sector
204210
*
205211
* @param {number} r : radius
206212
* @param {number} a0 : first angular coordinate
@@ -213,7 +219,8 @@ function pathSector(r, a0, a1, cx, cy) {
213219
return _path(null, r, a0, a1, cx, cy, 1);
214220
}
215221

216-
/* path an annulus
222+
/**
223+
* path an annulus
217224
*
218225
* @param {number} r0 : first radial coordinate
219226
* @param {number} r1 : second radial coordinate

src/lib/search.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ exports.roundUp = function(val, arrayIn, reverse) {
115115
return arrayIn[low];
116116
};
117117

118-
/* find index in array 'arr' that minimizes 'fn'
118+
/**
119+
* find index in array 'arr' that minimizes 'fn'
119120
*
120121
* @param {array} arr : array where to search
121122
* @param {fn (optional)} fn : function to minimize,

src/plots/polar/helpers.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ var angleDelta = Lib.angleDelta;
1717
var angleDist = Lib.angleDist;
1818
var deg2rad = Lib.deg2rad;
1919

20-
/* is pt (r,a) inside polygon made up vertices at angles 'vangles'
20+
/**
21+
* is pt (r,a) inside polygon made up vertices at angles 'vangles'
2122
* inside a given polar sector
2223
*
2324
* @param {number} r : pt's radial coordinate
@@ -199,7 +200,8 @@ function findPolygonOffset(r, sector, vangles) {
199200
return [minX, minY];
200201
}
201202

202-
/* find vertex angles (in 'vangles') the enclose angle 'a'
203+
/**
204+
* find vertex angles (in 'vangles') the enclose angle 'a'
203205
*
204206
* @param {number} a : angle in *radians*
205207
* @param {array} vangles : angles of polygon vertices in *radians*
@@ -234,7 +236,8 @@ function transformForSVG(pts0, cx, cy) {
234236
return pts1;
235237
}
236238

237-
/* path polygon
239+
/**
240+
* path polygon
238241
*
239242
* @param {number} r : polygon 'radius'
240243
* @param {2-item array} sector : polar sector in which polygon is clipped
@@ -249,7 +252,8 @@ function pathPolygon(r, sector, vangles, cx, cy) {
249252
return 'M' + transformForSVG(poly, cx, cy).join('L');
250253
}
251254

252-
/* path a polygon 'annulus'
255+
/**
256+
* path a polygon 'annulus'
253257
* i.e. a polygon with a concentric hole
254258
*
255259
* N.B. this routine uses the evenodd SVG rule

0 commit comments

Comments
 (0)